[symfony-users] Re: Help with link cross applications

2009-05-22 Thread David Ashwood

Bring it up a folder to the /frontend/lib directory

-Original Message-
From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com]
On Behalf Of Reynier Perez Mira
Sent: 22 May 2009 17:56
To: symfony-users@googlegroups.com
Subject: [symfony-users] Help with link cross applications


Hi every:
I read this great article[1] wrote by Fabien and try to create a link
between frontend and backend applications. For that I modified some
parts of the original code from Fabien and now looks like this:

class frontendConfiguration extends sfApplicationConfiguration {
protected $backendRouting = null;
public function configure() {
 
$this-getActive()-loadHelpers(array('Form','I18N','Javascript','Date','Url
','Tag','Asset','Partial'));
}
public function generateBackendURL($name, $parameters = array()) {
return
sfConfig::get('app_aplication_url').$this-getBackendRouting()-generate($na
me, $parameters);
}
public function getBackendRouting() {
if (!$this-backendRouting) {
$this-backendRouting = new sfPatternRouting(new
sfEventDispatcher());
$config = new sfRoutingConfigHandler();
$routes =
$config-evaluate(array(sfConfig::get('sf_apps_dir').'/backend/config/routin
g.yml'));
$this-backendRouting-setRoutes($routes);
}
return $this-backendRouting;
}
}

Also I create a Helper called LinkCrossApplicationHelper.php and put it
inside /frontend/module/lib directory. The helper contains this piece of
code:

function link_to_backend($name, $parameters) {
return sfProjectConfiguration::getActive()-generateBackendURL($name,
$parameters);
}

Then in my template I call the helper method:
?php link_to_backend('hello', array('name' = 'Bar')) ?

But I get this error:
500 | Internal Server Error | InvalidArgumentException
Unable to load LinkCrossApplicationHelper.php helper in:
D:\Server\www\residencia\apps\frontend\modules/reservacion/lib/helper,
D:\Server\www\residencia\apps\frontend\lib/helper,
D:\Server\www\residencia\lib/helper,
D:/Server/SF/lib/plugins/sfProtoculousPlugin/lib/helper,
D:/Server/www/residencia/plugins/sfPagerNavigationPlugin/lib/helper,
D:\Server\SF\lib/helper, D:\Server\SF\lib\plugins\sfPropelPlugin\lib\vendor,
D:\Server\www\residencia, D:\Server\SF\lib, ., C:\php5\pear.

Can any help me at this point?
Cheers and thanks in advance
Ing. Reynier Pérez Mira
Dirección Técnica IP





--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[symfony-users] Re: Help with link cross applications

2009-05-22 Thread Reynier Perez Mira

 Bring it up a folder to the /frontend/lib directory
Nothing it doesn't work

Ing. Reynier Pérez Mira
Dirección Técnica IP

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[symfony-users] Re: Help with link cross applications

2009-05-22 Thread David Ashwood

Ok - I thought it would pick it up from there - otherwise put it into
apps/myapp/lib/helper/

-Original Message-
From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com]
On Behalf Of Reynier Perez Mira
Sent: 22 May 2009 18:41
To: symfony-users@googlegroups.com
Subject: [symfony-users] Re: Help with link cross applications


 Bring it up a folder to the /frontend/lib directory
Nothing it doesn't work

Ing. Reynier Pérez Mira
Dirección Técnica IP



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[symfony-users] Re: Help with link cross applications

2009-05-22 Thread Reynier Perez Mira

 Ok - I thought it would pick it up from there - otherwise put it into
 apps/myapp/lib/helper/
Thx, now it works but show me another error:
500 | Internal Server Error | sfConfigurationException
The route reservacion/new does not exist.

This route exists in /apps/backend/config/routing.yml so what is the problem?
Cheers
Ing. Reynier Pérez Mira
Dirección Técnica IP

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---