logo       

[symfony-users] Re: How do I get a module path?: msg#00925

symfony-users

Subject: [symfony-users] Re: How do I get a module path?

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.reis@xxxxxxxxx>
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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to symfony-users+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise