/** * Method to render the view. * * @return string The rendered view. * * @throws \RuntimeException * @since 1.0 */ public function render() { // Set the vars to the template. $this->renderer->set('items', $this->model->getItems()); $this->renderer->set('pagination', $this->model->getPagination()); $this->renderer->set('state', $this->model->getState()); $this->renderer->set('project', $this->getProject()); return parent::render(); }
/** * 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; }