CoreFiles by mySites.guru
HtmlView.php74 lines, 1,599 bytes, from Joomla_4.2.0-beta1-Beta-Full_Package.zip
Raw History Compare with 4.1.0-beta3
md5
f035ba2662213bba47ad9dfd545bc87b
sha1
f1b1da1904e079324373aa11607e85f397f398c3
sha256
a36ebc9899e6932a8dfb974d4f505c160715fa4bde782d020340fb529ca53623
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_installer
 *
 * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\Component\Installer\Administrator\View\Install;

\defined('_JEXEC') or die;

use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;

/**
 * Extension Manager Install View
 *
 * @since  1.5
 */
class HtmlView extends InstallerViewDefault
{
	/**
	 * Display the view
	 *
	 * @param   string  $tpl  Template
	 *
	 * @return  void
	 *
	 * @since   1.5
	 */
	public function display($tpl = null)
	{
		if (!Factory::getUser()->authorise('core.admin'))
		{
			throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
		}

		$paths        = new \stdClass;
		$paths->first = '';

		$this->paths  = &$paths;

		PluginHelper::importPlugin('installer');

		parent::display($tpl);
	}

	/**
	 * Add the page title and toolbar.
	 *
	 * @return  void
	 *
	 * @since   1.6
	 */
	protected function addToolbar()
	{
		if (ContentHelper::getActions('com_installer')->get('core.manage'))
		{
			ToolbarHelper::link('index.php?option=com_installer&view=manage', 'COM_INSTALLER_TOOLBAR_MANAGE', 'list');
			ToolbarHelper::divider();
		}

		parent::addToolbar();

		ToolbarHelper::help('Extensions:_Install');
	}
}

The same content is in 21 releases, Joomla 4.1.0-beta3 to 4.2.0-beta1. See them all, or every version of this file.