Source for file controller.php

Documentation is available at controller.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_languages
  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.  * Languages Controller
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_languages
  17.  * @since       1.5
  18.  */
  19. {
  20.     /**
  21.      * @var        string    The default view.
  22.      * @since   1.6
  23.      */
  24.     protected $default_view = 'installed';
  25.  
  26.     /**
  27.      * Method to display a view.
  28.      *
  29.      * @param   boolean            If true, the view output will be cached
  30.      * @param   array  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  31.      *
  32.      * @return  JController        This object to support chaining.
  33.      * @since   1.5
  34.      */
  35.     public function display($cachable false$urlparams false)
  36.     {
  37.         require_once JPATH_COMPONENT.'/helpers/languages.php';
  38.  
  39.         $view   $this->input->get('view''languages');
  40.         $layout $this->input->get('layout''default');
  41.         $id     $this->input->getInt('id');
  42.  
  43.         // Check for edit form.
  44.         if ($view == 'language' && $layout == 'edit' && !$this->checkEditId('com_languages.edit.language'$id)) {
  45.  
  46.             // Somehow the person just went to the form - we don't allow that.
  47.             $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID'$id));
  48.             $this->setMessage($this->getError()'error');
  49.             $this->setRedirect(JRoute::_('index.php?option=com_languages&view=languages'false));
  50.  
  51.             return false;
  52.         }
  53.  
  54.         parent::display();
  55.  
  56.         return $this;
  57.     }
  58. }

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