Source for file controller.php

Documentation is available at controller.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_joomlaupdate
  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.  * Joomla! Update Controller
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_joomlaupdate
  17.  * @since       2.5.4
  18.  */
  19. {
  20.     /**
  21.      * Method to display a view.
  22.      *
  23.      * @param   boolean            If true, the view output will be cached
  24.      * @param   array  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.      * @since    2.5.4
  28.      */
  29.     public function display($cachable false$urlparams false)
  30.     {
  31.         // Get the document object.
  32.         $document JFactory::getDocument();
  33.  
  34.         // Set the default view name and format from the Request.
  35.         $vName   $this->input->get('view''default');
  36.         $vFormat $document->getType();
  37.         $lName   $this->input->get('layout''default');
  38.  
  39.         // Get and render the view.
  40.         if ($view $this->getView($vName$vFormat))
  41.         {
  42.             $ftp JClientHelper::setCredentialsFromRequest('ftp');
  43.             $view->ftp &$ftp;
  44.  
  45.             // Get the model for the view.
  46.             $model $this->getModel($vName);
  47.  
  48.             // Perform update source preference check and refresh update information
  49.             $model->applyUpdateSite();
  50.             $model->refreshUpdates();
  51.  
  52.             // Push the model into the view (as default).
  53.             $view->setModel($modeltrue);
  54.             $view->setLayout($lName);
  55.  
  56.             // Push document object into the view.
  57.             $view->document $document;
  58.             $view->display();
  59.         }
  60.  
  61.         return $this;
  62.     }
  63. }

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