- md5
- 0f95e99b59ec108ba3e26fd09e69b85b
- sha1
- db9549cce7d9b934daa426cc5ca2ca907e0f19b8
- sha256
- 802f45320ccd95e1ec54449c269c2c4b51a333cdde663cb7333d304059d4d202
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cache
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* HTML View class for the Cache component
*
* @since 1.6
*/
class CacheViewCache extends JViewLegacy
{
/**
* @var object client object.
* @deprecated 4.0
*/
protected $client;
protected $data;
protected $pagination;
protected $state;
/**
* Display a view.
*
* @param string $tpl The name of the template file to parse; automatically searches through the template paths.
*
* @return mixed A string if successful, otherwise an Error object.
*/
public function display($tpl = null)
{
$this->data = $this->get('Data');
$this->pagination = $this->get('Pagination');
$this->total = $this->get('Total');
$this->state = $this->get('State');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
if ($state->get('client_id') == 1)
{
JToolbarHelper::title(JText::_('COM_CACHE_CLEAR_CACHE_ADMIN_TITLE'), 'lightning clear');
}
else
{
JToolbarHelper::title(JText::_('COM_CACHE_CLEAR_CACHE_SITE_TITLE'), 'lightning clear');
}
JToolbarHelper::custom('delete', 'delete.png', 'delete_f2.png', 'JTOOLBAR_DELETE', true);
JToolbarHelper::custom('deleteAll', 'delete.png', 'delete_f2.png', 'JTOOLBAR_DELETE_ALL', false);
JToolbarHelper::divider();
if (JFactory::getUser()->authorise('core.admin', 'com_cache'))
{
JToolbarHelper::preferences('com_cache');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_SITE_MAINTENANCE_CLEAR_CACHE');
JHtmlSidebar::setAction('index.php?option=com_cache');
}
}
The same content is in 14 releases, Joomla 3.7.0-alpha2 to 3.7.2. See them all, or every version of this file.