I'm in a task... I guess I could do $this->getContext huh (: On Tue, Mar 23, 2010 at 11:17 AM, Pascal <[email protected]> wrote: > For the record : > I never told you to use sfContext !! don't let ppl think that :P > I gave that hint : > in (Project/Plugin)Configuration.class.php initialize method : > > $this->dispatcher->connect('admin.pre_execute', array($this, > 'listenToAdminPreActionEvent')); > > and here the newly created listenToAdminPreActionEvent > > static public function listenToAdminPreActionEvent(sfEvent $event) > { > // check for a module generator config file > $configCache = $event->getSubject()->getContext()->getConfigCache() > ; > $configCache->import('modules/survey_step/config/generator.yml', false, > true); > $configCache->import('modules/survey_field/config/generator.yml', false, > true); > } > > Glad it helped :) > Sorry for the spam. > [MA]Pascal > On Tue, Mar 23, 2010 at 15:09, Tom Boutell <[email protected]> wrote: >> >> For curious parties, Pascal sent a hint that led to this solution: >> >> foreach ($adminGeneratorModules as $module) >> { >> $configCache = sfContext::getInstance()->getConfigCache(); >> $configCache->import("modules/$module/config/generator.yml", false, >> true); >> } >> >> That seems to work very well. >> >> On Sat, Mar 20, 2010 at 11:02 PM, Tom Boutell <[email protected]> wrote: >> > I'd like to force an admin generator module to generate itself exactly >> > as if a user with the proper credentials etc. had come along and >> > required it. I haven't been able to figure out where that happens. Any >> > clues? >> > >> > I guess in the worst case I could use the functional testing stuff to >> > generate that situation and handle the credentials problem, but I >> > suspect it would be simple to ask it to generate itself directly if I >> > could only figure out where that happens in the Symfony core. >> > >> > Thanks! >> > >> > -- >> > Tom Boutell >> > P'unk Avenue >> > 215 755 1330 >> > punkave.com >> > window.punkave.com >> > >> >> >> >> -- >> Tom Boutell >> P'unk Avenue >> 215 755 1330 >> punkave.com >> window.punkave.com >> >> -- >> 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 developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/symfony-devs?hl=en >> >> To unsubscribe from this group, send email to >> symfony-devs+unsubscribegooglegroups.com or reply to this email with the >> words "REMOVE ME" as the subject. > > > > -- > Pascal > > -- > 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 developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/symfony-devs?hl=en > > To unsubscribe from this group, send email to > symfony-devs+unsubscribegooglegroups.com or reply to this email with the > words "REMOVE ME" as the subject. >
-- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com -- 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 developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en To unsubscribe from this group, send email to symfony-devs+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
