Of course! I'll post my implementation when it's ready. If I can give something useful to the community, it would be nice :)
On Fri, Aug 13, 2010 at 1:23 PM, Daniel Lohse <annismcken...@googlemail.com>wrote: > Well, while you're at it, here's a suggestion: When you are finished, do > you mind posting your solution somewhere? A snippet would be nice – along > with a quick explanation on how to do it. :) > > That'd be great (but is in no way mandatory, just a suggestion to give > something back to the community)! > > > Cheers, Daniel > > On 13.08.2010, at 17:14, Gustavo Adrian wrote: > > @Johannes: That's great. I can easily install plugins programmatically > after all. > > > Thank you guys! > > On Fri, Aug 13, 2010 at 12:04 PM, Johannes < > johannes.schmitt...@googlemail.com> wrote: > >> No explicit method as far as I know, but this works: >> >> sfConfig::set('sf_enabled_modules', >> array_unique(array_merge(sfConfig::get('sf_enabled_modules'), >> array('my_first_module_name_to_enable', 'my_second_module', 'etc')))); >> >> Kind regards, >> Johannes >> >> >> On 13 Aug., 14:57, Gustavo Adrian <comfortablynum...@gmail.com> wrote: >> > 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> >> > >> > > <symfony-users%2bunsubscr...@googlegroups.com<symfony-users%252bunsubscr...@googlegroups.com> >> <symfony-users%252bunsubscr...@googlegroups.com<symfony-users%25252bunsubscr...@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> >> > >> > > <symfony-users%2bunsubscr...@googlegroups.com<symfony-users%252bunsubscr...@googlegroups.com> >> <symfony-users%252bunsubscr...@googlegroups.com<symfony-users%25252bunsubscr...@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 > > > -- > 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