| [ Index ] |
PHP Cross Reference of Joomla 2.5.4 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @package Joomla.Administrator 4 * @subpackage com_config 5 * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved. 6 * @license GNU General Public License version 2 or later; see LICENSE.txt 7 */ 8 9 // No direct access 10 defined('_JEXEC') or die; 11 12 jimport('joomla.application.component.controller'); 13 14 /** 15 * Config Component Controller 16 * 17 * @package Joomla.Administrator 18 * @subpackage com_config 19 * @since 1.5 20 */ 21 class ConfigController extends JController 22 { 23 /** 24 * @var string The default view. 25 * @since 1.6 26 */ 27 protected $default_view = 'application'; 28 29 /** 30 * Method to display the view. 31 * 32 * @param boolean If true, the view output will be cached 33 * @param array An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. 34 * 35 * @return JController This object to support chaining. 36 * @since 1.5 37 */ 38 public function display($cachable = false, $urlparams = false) 39 { 40 // Get the document object. 41 $document = JFactory::getDocument(); 42 43 // Set the default view name and format from the Request. 44 $vName = JRequest::getCmd('view', 'application'); 45 $vFormat = $document->getType(); 46 $lName = JRequest::getCmd('layout', 'default'); 47 48 // Get and render the view. 49 if ($view = $this->getView($vName, $vFormat)) { 50 if ($vName != 'close') { 51 // Get the model for the view. 52 $model = $this->getModel($vName); 53 54 // Access check. 55 if (!JFactory::getUser()->authorise('core.admin', $model->getState('component.option'))) { 56 return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); 57 } 58 59 // Push the model into the view (as default). 60 $view->setModel($model, true); 61 } 62 63 $view->setLayout($lName); 64 65 // Push document object into the view. 66 $view->assignRef('document', $document); 67 68 $view->display(); 69 } 70 } 71 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Tue Apr 3 11:40:28 2012 | Cross-referenced by PHPXref 0.7.1 |