CoreFiles by mySites.guru
HtmlView.php71 lines, 1,734 bytes, from Joomla_4.2.1-rc2-Release_Candidate-Full_Package.zip
Raw History Compare with 4.2.1-rc1
md5
fa43258ec00be1b18b1002702c6cf148
sha1
b775bdd2187b990a72e6d879da53f7214fc77351
sha256
95b06cf92c00364f54cf66eed3b995a9bcbcdced6abdde4d569151649005aaea
<?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;

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 (!$this->getCurrentUser()->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 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.