/**
  * @param \FSi\Bundle\AdminBundle\Event\AdminEvent $event
  * @return \FSi\Bundle\AdminBundle\Event\FormEvent
  * @throws \FSi\Bundle\AdminBundle\Exception\RequestHandlerException
  */
 protected function validateEvent(AdminEvent $event)
 {
     if (!$event instanceof FormEvent) {
         throw new RequestHandlerException(sprintf("%s require FormEvent", get_class($this)));
     }
     if (!$event->getElement() instanceof RedirectableElement) {
         throw new RequestHandlerException(sprintf("%s require RedirectableElement", get_class($this)));
     }
     return $event;
 }
Exemple #2
0
 /**
  * @param \FSi\Bundle\AdminBundle\Admin\Element $element
  * @param \Symfony\Component\HttpFoundation\Request $request
  * @param \FSi\Bundle\AdminBundle\Display\Display $display
  */
 public function __construct(Element $element, Request $request, Display $display)
 {
     parent::__construct($element, $request);
     $this->display = $display;
 }
Exemple #3
0
 /**
  * @param \FSi\Bundle\AdminBundle\Admin\Element $element
  * @param \Symfony\Component\HttpFoundation\Request $request
  * @param \Symfony\Component\Form\FormInterface $form
  */
 public function __construct(Element $element, Request $request, FormInterface $form)
 {
     parent::__construct($element, $request);
     $this->form = $form;
 }
Exemple #4
0
 /**
  * @param \FSi\Bundle\AdminBundle\Admin\Element $element
  * @param \Symfony\Component\HttpFoundation\Request $request
  * @param \FSi\Component\DataSource\DataSourceInterface $dataSource
  * @param \FSi\Component\DataGrid\DataGridInterface $dataGrid
  */
 public function __construct(Element $element, Request $request, DataSourceInterface $dataSource, DataGridInterface $dataGrid)
 {
     parent::__construct($element, $request);
     $this->dataSource = $dataSource;
     $this->dataGrid = $dataGrid;
 }