Hi all, Is there a way to retrieve a module "absolute path" or "real path" using symfony api? I need to get the path to template files too. Is there a way to do it passing only action and template/partial name?
2009/7/29 Bruno Reis <bruno.p.r...@gmail.com> > Hi all, > > how do I get a molude path using symfony classes? I have only the module > name and it can be a plugin module. > > Today I loop trought all the plugins, but I believe sf has a better way to > do that: > > $pc = sfProjectConfiguration::getActive(); > $paths = $pc->getPluginPaths(); > $basepath = '../apps/frontend'; > array_unshift($paths, $basepath); > $filepath = '/modules/' . $moduleName . > '/actions/actions.class.php'; > $done = false; > foreach($paths as $path) { > $path .= $filepath; > if(file_exists($path)) { > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---