Пример #1
0
 /**
  * Method to render the view.
  *
  * @return  string  The rendered view.
  *
  * @since   1.0
  * @throws  \RuntimeException
  */
 public function render()
 {
     // Set the vars to the template.
     $this->renderer->set('items', $this->model->getItems());
     $this->renderer->set('project', $this->getProject());
     return parent::render();
 }
Пример #2
0
 /**
  * Initialize the controller.
  *
  * @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;
 }