Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_search
  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.  * View class for a list of search terms.
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_search
  17.  * @since       1.5
  18.  */
  19. {
  20.     protected $enabled;
  21.  
  22.     protected $items;
  23.  
  24.     protected $pagination;
  25.  
  26.     protected $state;
  27.  
  28.     /**
  29.      * Display the view
  30.      */
  31.     public function display($tpl null)
  32.     {
  33.         $this->items        = $this->get('Items');
  34.         $this->pagination    = $this->get('Pagination');
  35.         $this->state        = $this->get('State');
  36.         $this->enabled        = $this->state->params->get('enabled');
  37.  
  38.         // Check for errors.
  39.         if (count($errors $this->get('Errors')))
  40.         {
  41.             JError::raiseError(500implode("\n"$errors));
  42.             return false;
  43.         }
  44.  
  45.         $this->addToolbar();
  46.         parent::display($tpl);
  47.     }
  48.  
  49.     /**
  50.      * Add the page title and toolbar.
  51.      *
  52.      * @since   1.6
  53.      */
  54.     protected function addToolbar()
  55.     {
  56.         $canDo    SearchHelper::getActions();
  57.  
  58.         JToolbarHelper::title(JText::_('COM_SEARCH_MANAGER_SEARCHES')'search');
  59.  
  60.         if ($canDo->get('core.edit.state'))
  61.         {
  62.             JToolbarHelper::custom('searches.reset''refresh.png''refresh_f2.png''JSEARCH_RESET'false);
  63.         }
  64.         JToolbarHelper::divider();
  65.         if ($canDo->get('core.admin'))
  66.         {
  67.             JToolbarHelper::preferences('com_search');
  68.         }
  69.         JToolbarHelper::divider();
  70.         JToolbarHelper::help('JHELP_COMPONENTS_SEARCH');
  71.     }
  72. }

Documentation generated on Tue, 19 Nov 2013 15:17:29 +0100 by phpDocumentor 1.4.3