Hi James. I was thinking and something like that too. What I don't know is how to enable the modules of the plugin programmatically. Is there available a method for this purpose?
Thanks! On Fri, Aug 13, 2010 at 3:37 AM, James Cauwelier <james.cauwel...@gmail.com>wrote: > It is possible to enable a plugin from the projectConfiguration > methods, but nobody dictates that the plugin names should be hardcoded > there, you could use a configuration XML for instance... > > The code below does not work, but illustrates the principle. There is > also more than one way to do this. You don 't have to use XML and > could use a database or any other kind of storage. Doctrine is also > packaged as a plugin, so it probably is not possible to use doctrine > for this. > > public function setup() > { > if (file_exists('enablePlugins.xml')) { > $xml = simplexml_load_file('enablePlugins.xml'); > $enabledPluginsXml = $xml->xpath(...); > $this->enablePlugins($enabledPluginsXml); > } > } > > > On 12 aug, 22:12, Gustavo Adrian <comfortablynum...@gmail.com> wrote: > > Hi, first of all, thank you both guys for your answers. > > > > @Damon: I couldn't try that yet but, as you said, the only problem I see > is > > that I have no way (that I know) of enable the plugin on > > ProjectConfiguration class. And this class is used on the very first part > of > > the framework initialization. I need this because I need a way to install > (a > > kind of) plugins from my backend to extend a CMS I'm developing and, if I > > could use the plugin functionality that Symfony already has, it would be > > great. If I can't, then I'd need to create my own plugin system (which, > as > > you would guess, it can take a long time). > > > > @Stéphane: Could you point me to a place where Symfony use this to look > for > > examples of code? In which way would you use this class for my need? > > > > Thank you both again! > > > > On Thu, Aug 12, 2010 at 4:33 AM, Stéphane <stephane.er...@gmail.com> > wrote: > > > There is a class which helps you "wrapping" methods. Search for > > > sfClassManipulator. > > > > > Cheers, > > > > > Before Printing, Think about Your Environmental Responsibility! > > > Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! > > > > > On Thu, Aug 12, 2010 at 8:07 AM, Damon Jones <damonljo...@gmail.com > >wrote: > > > > >> You can certainly run these tasks from within a task, as described > > >> here: > > > > >>http://www.symfony-project.org/more-with-symfony/1_4/en/13-Leveraging. > .. > > > > >> So, maybe you can create instance of these tasks and run them from > > >> elsewhere in your code. > > > > >> I think the issue would be how you enable them in your > > >> ProjectConfiguration. > > > > >> On Aug 11, 8:49 pm, Gustavo Adrian <comfortablynum...@gmail.com> > > >> wrote: > > >> > Hi! > > > > >> > Quick question: Is there a way to install and enable a plugin from > PHP? > > > > >> > Thanks! > > > > >> -- > > >> If you want to report a vulnerability issue on symfony, please send it > to > > >> security at symfony-project.com > > > > >> 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<symfony-users%2bunsubscr...@googlegroups.com> > <symfony-users%2bunsubscr...@googlegroups.com<symfony-users%252bunsubscr...@googlegroups.com> > > > > >> For more options, visit this group at > > >>http://groups.google.com/group/symfony-users?hl=en > > > > > -- > > > If you want to report a vulnerability issue on symfony, please send it > to > > > security at symfony-project.com > > > > > 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<symfony-users%2bunsubscr...@googlegroups.com> > <symfony-users%2bunsubscr...@googlegroups.com<symfony-users%252bunsubscr...@googlegroups.com> > > > > > For more options, visit this group at > > >http://groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > 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<symfony-users%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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