Source for file controller.php

Documentation is available at controller.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_finder
  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
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. JLoader::register('FinderHelperLanguage'JPATH_ADMINISTRATOR '/components/com_finder/helpers/language.php');
  13.  
  14. /**
  15.  * Finder Component Controller.
  16.  *
  17.  * @package     Joomla.Site
  18.  * @subpackage  com_finder
  19.  * @since       2.5
  20.  */
  21. {
  22.     /**
  23.      * Method to display a view.
  24.      *
  25.      * @param   boolean  $cachable   If true, the view output will be cached. [optional]
  26.      * @param   array    $urlparams  An array of safe url parameters and their variable types,
  27.      *                                for valid values see {@link JFilterInput::clean()}. [optional]
  28.      *
  29.      * @return  JControllerLegacy  This object is to support chaining.
  30.      *
  31.      * @since   2.5
  32.      */
  33.     public function display($cachable false$urlparams array())
  34.     {
  35.         $input JFactory::getApplication()->input;
  36.         $cachable true;
  37.  
  38.         // Load plug-in language files.
  39.  
  40.         // Set the default view name and format from the Request.
  41.         $viewName $input->get('view''search''word');
  42.         $input->set('view'$viewName);
  43.  
  44.         // Don't cache view for search queries
  45.         if ($input->get('q'|| $input->get('f'|| $input->get('t'))
  46.         {
  47.             $cachable false;
  48.         }
  49.  
  50.         $safeurlparams array(
  51.             'f'     => 'INT',
  52.             'lang'     => 'CMD'
  53.         );
  54.  
  55.         return parent::display($cachable$safeurlparams);
  56.     }
  57. }

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