- md5
- 75c1430eaf798374b01007b675550547
- sha1
- 9dc02fe8871f5a0277231171ffd8895cff73376b
- sha256
- a49d7565e511c0376d56dbf7510e80fa359d14274d60b829dd20237b71a76dff
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Cpanel\Administrator\View\System;
defined('_JEXEC') or die;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Updater\Updater;
/**
* HTML View class for the Cpanel component
*
* @since 1.0
*/
class HtmlView extends BaseHtmlView
{
/**
* The list of links
*
* @var \Joomla\Component\Cpanel\Administrator\Entities\SystemHeader[]
*/
public $links = [];
/**
* Execute and display a template script.
*
* @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.
*
* @since 1.6
*/
public function display($tpl = null)
{
// Set toolbar items for the page
ToolbarHelper::title(Text::_('COM_CPANEL_TITLE_SYSTEM_PANEL'), 'cog help_header');
ToolbarHelper::help('screen.cpanel');
/** @var \Joomla\Component\Cpanel\Administrator\Model\SystemModel $model */
$model = $this->getModel();
$this->links = $model->getItems();
$hasItems = false;
foreach ($this->links as $section)
{
if ($section->hasItems())
{
$hasItems = true;
break;
}
}
if (!$hasItems)
{
throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
}
Factory::getLanguage()->load(
'mod_menu',
JPATH_ADMINISTRATOR,
Factory::getLanguage()->getTag(),
true
);
return parent::display($tpl);
}
}
No other release has this exact content. See every version of this file.