This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Load plugin module on the fly

Discussion specific to symfony 1.1.x stable

Load plugin module on the fly

by joostdj » Wed Aug 20, 2008 1:14 pm

I want to extend/override a module (already present in frontend app), only if some request parameters are given.

Therefore, is there a possibility to load a plugin module on the fly??

Or is there a better solution for this??

Thanx!
joostdj
Member
 
Posts: 44
Joined: Tue Nov 13, 2007 1:01 pm

Re: Load plugin module on the fly

by skoop » Wed Aug 20, 2008 2:15 pm

You could do that with the new routing system of symfony 1.1 (assuming you use 1.1, but I think you guys are already doing that, right?)

You can use the routing constraints to route your requests to specific modules based on parameters. Might be worth having a look at that.

Good luck
Ibuildings - The PHP Professionals
skoop
Junior Member
 
Posts: 21
Joined: Wed Nov 08, 2006 11:36 am
Location: The Netherlands

Re: Load plugin module on the fly

by joostdj » Wed Aug 20, 2008 2:34 pm

That is not a solution in my case. I will explain the situation more specific:

I have configured an sfFilter which sets a config value, for example: sfConfig::set('var', 'value1');

If this config value equals 'value1' I want to load 'valueOnePlugin', which contains of some modules which have to override and/or extend the default application modules.

A solution without use of plugins is welcome also!!
joostdj
Member
 
Posts: 44
Joined: Tue Nov 13, 2007 1:01 pm

Re: Load plugin module on the fly

by skoop » Wed Aug 20, 2008 2:59 pm

Ok, I don't have a lot of time to check specific solutions, so here's a free-floating idea: can you not forward the user to the plugin inside the filter? You should be able to forward (keeping the URL the same but calling a different action) instead of redirecting.
Ibuildings - The PHP Professionals
skoop
Junior Member
 
Posts: 21
Joined: Wed Nov 08, 2006 11:36 am
Location: The Netherlands

Re: Load plugin module on the fly

by joostdj » Wed Aug 20, 2008 4:14 pm

The ysfDimensionsPlugin solved my issue.

Thanx anyway! 8-)
joostdj
Member
 
Posts: 44
Joined: Tue Nov 13, 2007 1:01 pm

Re: Load plugin module on the fly

by menno » Wed Feb 16, 2011 2:13 pm

joostdj wrote:The ysfDimensionsPlugin solved my issue.

Thanx anyway! 8-)


Hi Joost,

It's been a while since you needed this figured this out, but I'm running into the same problem (using sf 1.4).
Can you tell me how you did this exactly?

Tia, Menno.
menno
Junior Member
 
Posts: 2
Joined: Wed May 07, 2008 11:28 am