Esempio n. 1
0
 /**
  * Gets the 'craue.form.flow' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return \Craue\FormFlowBundle\Form\FormFlow A Craue\FormFlowBundle\Form\FormFlow instance
  */
 protected function getCraue_Form_FlowService()
 {
     $this->services['craue.form.flow'] = $instance = new \Craue\FormFlowBundle\Form\FormFlow();
     $instance->setDataManager($this->get('craue.form.flow.data_manager'));
     $instance->setFormFactory($this->get('form.factory'));
     $instance->setRequestStack($this->get('request_stack'));
     if ($this->has('debug.event_dispatcher')) {
         $instance->setEventDispatcher($this->get('debug.event_dispatcher', ContainerInterface::NULL_ON_INVALID_REFERENCE));
     }
     return $instance;
 }
 /**
  * Gets the 'craue.form.flow' service.
  *
  * This service is shared.
  * This method always returns the same instance of the service.
  *
  * @return \Craue\FormFlowBundle\Form\FormFlow A Craue\FormFlowBundle\Form\FormFlow instance
  *
  * @throws InactiveScopeException when the 'craue.form.flow' service is requested while the 'request' scope is not active
  */
 protected function getCraue_Form_FlowService()
 {
     if (!isset($this->scopedServices['request'])) {
         throw new InactiveScopeException('craue.form.flow', 'request');
     }
     $this->services['craue.form.flow'] = $this->scopedServices['request']['craue.form.flow'] = $instance = new \Craue\FormFlowBundle\Form\FormFlow();
     $instance->setFormFactory($this->get('form.factory'));
     $instance->setRequest($this->get('request'));
     $instance->setStorage($this->get('craue.form.flow.storage'));
     if ($this->has('debug.event_dispatcher')) {
         $instance->setEventDispatcher($this->get('debug.event_dispatcher', ContainerInterface::NULL_ON_INVALID_REFERENCE));
     }
     return $instance;
 }