Пример #1
0
 /**
  * Initialize the controller.
  *
  * This will set up default model and view classes.
  *
  * @return  $this  Method allows chaining
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function initialize()
 {
     parent::initialize();
     $this->getContainer()->get('app')->getUser()->authorize('manage');
     $this->view->setProject($this->getContainer()->get('app')->getProject());
     return $this;
 }
Пример #2
0
 /**
  * Initialize the controller.
  *
  * This will set up default model and view classes.
  *
  * @return  $this  Method allows chaining
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function initialize()
 {
     parent::initialize();
     $this->getContainer()->get('app')->getUser()->authorize('manage');
     $this->model->setProject($this->getContainer()->get('app')->getProject());
     $this->model->setGroupId($this->getContainer()->get('app')->input->getInt('group_id'));
     $this->view->setProject($this->getContainer()->get('app')->getProject());
     return $this;
 }