- md5
- 00bd549b06ed43845f30321aa292174f
- sha1
- 93f810c774a95634843fb7dca80bf048e32d03f8
- sha256
- 914726491bbf2f7caebf31d7bda855f6ec8168ab114361aafeb0a71c29ab7072
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
<?php
/**
* @package Joomla.Administrator
* @subpackage com_cpanel
*
* @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\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;
/**
* 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.