Source for file view.html.php

Documentation is available at view.html.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Administrator
  4.  * @subpackage  com_cache
  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.  * HTML View class for the Cache component
  14.  *
  15.  * @package     Joomla.Administrator
  16.  * @subpackage  com_cache
  17.  * @since       1.6
  18.  */
  19. class CacheViewCache extends JViewLegacy
  20. {
  21.     protected $client;
  22.     protected $data;
  23.     protected $pagination;
  24.     protected $state;
  25.  
  26.     public function display($tpl null)
  27.     {
  28.         $this->data            = $this->get('Data');
  29.         $this->client        = $this->get('Client');
  30.         $this->pagination    = $this->get('Pagination');
  31.         $this->state        = $this->get('State');
  32.  
  33.         // Check for errors.
  34.         if (count($errors $this->get('Errors')))
  35.         {
  36.             JError::raiseError(500implode("\n"$errors));
  37.             return false;
  38.         }
  39.  
  40.         $this->addToolbar();
  41.         $this->sidebar JHtmlSidebar::render();
  42.         parent::display($tpl);
  43.     }
  44.  
  45.     /**
  46.      * Add the page title and toolbar.
  47.      *
  48.      * @since   1.6
  49.      */
  50.     protected function addToolbar()
  51.     {
  52.         JToolbarHelper::title(JText::_('COM_CACHE_CLEAR_CACHE')'lightning clear');
  53.         JToolbarHelper::custom('delete''delete.png''delete_f2.png''JTOOLBAR_DELETE'true);
  54.         JToolbarHelper::divider();
  55.         if (JFactory::getUser()->authorise('core.admin''com_cache'))
  56.         {
  57.             JToolbarHelper::preferences('com_cache');
  58.         }
  59.         JToolbarHelper::divider();
  60.         JToolbarHelper::help('JHELP_SITE_MAINTENANCE_CLEAR_CACHE');
  61.  
  62.         JHtmlSidebar::setAction('index.php?option=com_cache');
  63.  
  64.         JHtmlSidebar::addFilter(
  65.             // @todo We need an actual label here
  66.             '',
  67.             'filter_client_id',
  68.             JHtml::_('select.options'CacheHelper::getClientOptions()'value''text'$this->state->get('clientId'))
  69.         );
  70.     }
  71. }

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