- md5
- 14e5a3f344f4004a9676533d780c27df
- sha1
- bad52f76cf75b737a8d1e7e13fe74a84b9b3d4ae
- sha256
- 12ea91c21a359204f102fb2a2277a88227ff0a68a69051e04bf9ca10c876ca9f
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
<?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\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 \JViewGenericdataexception(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.