Example #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->model->setProject($this->getContainer()->get('app')->getProject());
     $this->view->setProject($this->getContainer()->get('app')->getProject());
     return $this;
 }
Example #2
0
 /**
  * Initialize the controller.
  *
  * @return  $this  Method supports chaining
  *
  * @since   1.0
  */
 public function initialize()
 {
     parent::initialize();
     /* @type \JTracker\Application $application */
     $application = $this->getContainer()->get('app');
     $application->getUser()->authorize('manage');
     $this->model->setProject($this->getContainer()->get('app')->getProject(true));
     $this->view->setProject($this->getContainer()->get('app')->getProject());
     return $this;
 }