[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_installer/ -> controller.php (source)

   1  <?php
   2  /**
   3   * @package        Joomla.Administrator
   4   * @subpackage    com_installer
   5   * @copyright    Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
   6   * @license        GNU General Public License, see LICENSE.php
   7   */
   8  
   9  // No direct access.
  10  defined('_JEXEC') or die;
  11  
  12  jimport('joomla.application.component.controller');
  13  
  14  /**
  15   * Installer Controller
  16   *
  17   * @package        Joomla.Administrator
  18   * @subpackage    com_installer
  19   * @since        1.5
  20   */
  21  class InstallerController extends JController
  22  {
  23      /**
  24       * Method to display a view.
  25       *
  26       * @param    boolean            If true, the view output will be cached
  27       * @param    array            An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  28       *
  29       * @return    JController        This object to support chaining.
  30       * @since    1.5
  31       */
  32  	public function display($cachable = false, $urlparams = false)
  33      {
  34          require_once  JPATH_COMPONENT.'/helpers/installer.php';
  35  
  36          // Get the document object.
  37          $document = JFactory::getDocument();
  38  
  39          // Set the default view name and format from the Request.
  40          $vName        = JRequest::getCmd('view', 'install');
  41          $vFormat    = $document->getType();
  42          $lName        = JRequest::getCmd('layout', 'default');
  43  
  44          // Get and render the view.
  45          if ($view = $this->getView($vName, $vFormat)) {
  46              $ftp    = JClientHelper::setCredentialsFromRequest('ftp');
  47              $view->assignRef('ftp', $ftp);
  48  
  49              // Get the model for the view.
  50              $model = $this->getModel($vName);
  51  
  52              // Push the model into the view (as default).
  53              $view->setModel($model, true);
  54              $view->setLayout($lName);
  55  
  56              // Push document object into the view.
  57              $view->assignRef('document', $document);
  58              // Load the submenu.
  59              InstallerHelper::addSubmenu($vName);
  60              $view->display();
  61          }
  62  
  63          return $this;
  64      }
  65  }


Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1