/** * 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; }
/** * 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; }