Source for file controller.php

Documentation is available at controller.php

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

Documentation generated on Tue, 19 Nov 2013 14:57:26 +0100 by phpDocumentor 1.4.3