- md5
- d67b61c7c986332a58e58779d167df67
- sha1
- b2167937d9d391c78304502eca338575060c0a3d
- sha256
- 57fd00105d6ec247eec95cef586c7bb97fda8b754b30811330fa24bf42164382
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cache
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cache\Administrator\View\Cache;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
/**
* HTML View class for the Cache component
*
* @since 1.6
*/
class HtmlView extends BaseHtmlView
{
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')))
{
throw new GenericDataException(implode("\n", $errors), 500);
}
$this->addToolbar();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolbar()
{
ToolbarHelper::title(Text::_('COM_CACHE_CLEAR_CACHE'), 'lightning clear');
ToolbarHelper::custom('delete', 'delete.png', 'delete_f2.png', 'JTOOLBAR_DELETE', true);
ToolbarHelper::custom('deleteAll', 'remove.png', 'delete_f2.png', 'JTOOLBAR_DELETE_ALL', false);
ToolbarHelper::divider();
if (Factory::getUser()->authorise('core.admin', 'com_cache'))
{
ToolbarHelper::preferences('com_cache');
}
ToolbarHelper::divider();
ToolbarHelper::help('JHELP_SITE_MAINTENANCE_CLEAR_CACHE');
\JHtmlSidebar::setAction('index.php?option=com_cache');
}
}
No other release has this exact content. See every version of this file.