input->get('view', 'application'); $vFormat = $document->getType(); $lName = $this->input->get('layout', 'default'); // Get and render the view. if ($view = $this->getView($vName, $vFormat)) { if ($vName != 'close') { // Get the model for the view. $model = $this->getModel($vName); // Access check. if (!JFactory::getUser()->authorise('core.admin', $model->getState('component.option'))) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } // Push the model into the view (as default). $view->setModel($model, true); } $view->setLayout($lName); // Push document object into the view. $view->document = $document; $view->display(); } } }