public function run(sfEvent $event)
 {
     $record = Doctrine_Core::getTable(sfSympalConfig::get('user_model'))->getRecordInstance();
     $this->_dispatcher->notify(new sfEvent($record, 'sympal.user.set_table_definition', array('object' => $record)));
     $this->_symfonyContext = $event->getSubject();
     $this->_invoker->setCache(new sfSympalCache($this->_invoker));
     $this->_invoker->setSymfonyContext($this->_symfonyContext);
     $this->_sympalContext = sfSympalContext::createInstance($this->_symfonyContext, $this->_invoker);
     $this->_invoker->setSympalContext($this->_sympalContext);
     $this->_enableModules();
     $this->_checkInstalled();
     $this->_invoker->initializeTheme();
     $helpers = array('Sympal', 'SympalContentSlot', 'SympalMenu', 'SympalPager', 'I18N', 'Asset', 'Url', 'Partial');
     if ($this->_invoker->isAdminModule()) {
         sfConfig::set('sf_login_module', 'sympal_admin');
         $helpers[] = 'Admin';
     }
     $this->_invoker->getProjectConfiguration()->loadHelpers($helpers);
     $this->_dispatcher->notify(new sfEvent($this, 'sympal.load'));
     new sfSympalContextLoadFactoriesListener($this->_dispatcher, $this->_invoker);
     new sfSympalComponentMethodNotFoundListener($this->_dispatcher, $this->_invoker);
     new sfSympalControllerChangeActionListener($this->_dispatcher, $this->_invoker);
     new sfSympalTemplateFilterParametersListener($this->_dispatcher, $this->_invoker);
     new sfSympalFormMethodNotFoundListener($this->_dispatcher, $this->_invoker);
     new sfSympalFormPostConfigureListener($this->_dispatcher, $this->_invoker);
     new sfSympalFormFilterValuesListener($this->_dispatcher, $this->_invoker);
 }
 /**
  * The callback on the context.load_factories event.
  * 
  * The subject is sfContext and the invoker is sfSympalConfiguration
  */
 public function run(sfEvent $event)
 {
     $this->_initiateUserTable();
     $this->_symfonyContext = $event->getSubject();
     $this->_invoker->setCache(new sfSympalCache($this->_invoker));
     $this->_invoker->setSymfonyContext($this->_symfonyContext);
     $this->_sympalContext = sfSympalContext::createInstance($this->_symfonyContext, $this->_invoker);
     $this->_invoker->setSympalContext($this->_sympalContext);
     $this->_enableModules();
     $this->_checkInstalled();
     $this->_invoker->initializeTheme();
     $this->_loadHelpers();
     $this->_dispatcher->notify(new sfEvent($this, 'sympal.load'));
     new sfSympalComponentMethodNotFoundListener($this->_dispatcher, $this->_invoker);
     new sfSympalControllerChangeActionListener($this->_dispatcher, $this->_invoker);
     new sfSympalTemplateFilterParametersListener($this->_dispatcher, $this->_invoker);
     new sfSympalFormMethodNotFoundListener($this->_dispatcher, $this->_invoker);
     new sfSympalFormPostConfigureListener($this->_dispatcher, $this->_invoker);
     new sfSympalFormFilterValuesListener($this->_dispatcher, $this->_invoker);
 }
 /**
  * Listens to the context.load_factories event and creates the sympal context
  */
 public function bootstrapContext(sfEvent $event)
 {
     $this->_sympalContext = sfSympalContext::createInstance($event->getSubject(), $this->getSympalConfiguration());
 }