This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.0 » plugin disable enable per application
plugin disable enable per application [message #92702] Tue, 02 February 2010 08:04 Go to next message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
Hi

i want to disable one plugin for particular application then how can i ..?

like i have two application

-application1
-application2

i want to enable one plugin for only application1 not for application2 then how can i do that..?


Thanks in advance
Re: plugin disable enable per application [message #92718 is a reply to message #92702 ] Tue, 02 February 2010 11:21 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
You enable modules, not plugins - and this is to be found in your settings.yml (for symfony 1.0, I think it is set programmatically in later versions).


Remember Palestine
Re: plugin disable enable per application [message #92778 is a reply to message #92702 ] Tue, 02 February 2010 23:21 Go to previous messageGo to next message
Russ  is currently offline Russ
Messages: 413
Registered: August 2008
Location: Oslo, Norway
Faithful Member

In later versions of symfony you do explicitly enable plugins (progammatically) whilst also continuing to enable modules the usual way (yaml).

To enable a plugin for one app and not the other, simply use the myappConfiguration.class.php file in the app/myapp/config directory instead of the (top level) projectConfiguration.class.php

public function configure()
{
  $this->enableAllPluginsExcept(array("sfPropelPlugin"));

//   or

  $this->enablePlugins(array('sfCompat10Plugin', "myAwesomePlugin"));
}


for example...

You could also (for example if you had loads of apps) use $this->disablePlugins() to explicitly disable plugins that have been loaded in ptoject config.

[edit: I just noticed this was in symfony 1.0 forum... oh well, I'll leave it anyway in case it pops up in a search Wink ]

[Updated on: Tue, 02 February 2010 23:22]


*On Freenode I am rooster*
http://www.walkandclimb.co.uk/images/monkeydust.jpghttp://www.walkandclimb.co.uk/userpix/2_linux_wave_small_2.jpg
Re: plugin disable enable per application [message #92786 is a reply to message #92778 ] Wed, 03 February 2010 04:57 Go to previous messageGo to next message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
i want to do this in symfony 1.0..

i have two application

and i want to use that plugin only for on plugin...so how can i disable that plugin for particular application...

as i have same module in plugin as well as in two plugin...so it create conflict...

Re: plugin disable enable per application [message #92803 is a reply to message #92702 ] Wed, 03 February 2010 11:34 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Read my advice again please. For symfony 1.0, this is correct - for 1.1 or 1.2 (not sure which) Russ is correct.


Remember Palestine
Re: plugin disable enable per application [message #92808 is a reply to message #92702 ] Wed, 03 February 2010 11:40 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Regarding your module naming conflict, I have answered this question twice now, and you are still asking! This is quite frustrating, as I feel like I'm wasting my time.

For the time being, I will have to leave your questions to other members.


Remember Palestine
Re: plugin disable enable per application [message #92831 is a reply to message #92808 ] Wed, 03 February 2010 13:39 Go to previous messageGo to next message
gaurangrajvir  is currently offline gaurangrajvir
Messages: 156
Registered: May 2007
Location: RAJKOT
Senior Member
no actually i was try to understand that to @Russ

that's why i write that again .. that is not intentionally i have posted twise...

sorry for inconvenience

Re: plugin disable enable per application [message #98738 is a reply to message #92778 ] Sat, 08 May 2010 20:31 Go to previous message
arrow3215  is currently offline arrow3215
Messages: 14
Registered: December 2009
Junior Member
@Russ
Using symfony 1.4 : When I try to disable a plugin like you described in "frontendConfiguration"
with
$this->enableAllPluginsExcept(array("sfMenuPlugin"));
or

$this->enablePlugins('sfDocFahrtenPlugin');
(when not having enabeled it in projectConfiguration.class.php before)

I get the error message "Plugins have already been loaded.".
Is this a different behaviour in symfony 1.44 or did I get something wrong?

solved: see http://forum.symfony-project.org/index.php/m/98739/#msg_9873 9

[Updated on: Sat, 08 May 2010 21:09]

Previous Topic:component and forward
Next Topic:message à supprimer
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software