/** * Method to render the view. * * @return string The rendered view. * * @throws RuntimeException */ public function render() { $this->item = $this->model->getIssue(); $user = JFactory::getUser(); if ($this->item) { if (!in_array($this->item->access, $user->getAuthorisedViewLevels())) { throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'), 403); } $this->canEditIssue = $this->model->canEdit($user, $this->item->id); } if ($this->getLayout() == null) { $this->setLayout('edit'); } $this->form = $this->model->getForm(); // Attachments $this->attachments = $this->model->getAttachments(); $this->addToolbar(); return parent::render(); }
/** * Loads the form. * * @return void */ public function loadForm() { $this->form = $this->model->getForm(); }