[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_installer/src/View/Install/ -> HtmlView.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_installer
   6   *
   7   * @copyright   (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
   8   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   9   */
  10  
  11  namespace Joomla\Component\Installer\Administrator\View\Install;
  12  
  13  use Joomla\CMS\Access\Exception\NotAllowed;
  14  use Joomla\CMS\Factory;
  15  use Joomla\CMS\Helper\ContentHelper;
  16  use Joomla\CMS\Language\Text;
  17  use Joomla\CMS\Plugin\PluginHelper;
  18  use Joomla\CMS\Toolbar\ToolbarHelper;
  19  use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;
  20  
  21  // phpcs:disable PSR1.Files.SideEffects
  22  \defined('_JEXEC') or die;
  23  // phpcs:enable PSR1.Files.SideEffects
  24  
  25  /**
  26   * Extension Manager Install View
  27   *
  28   * @since  1.5
  29   */
  30  class HtmlView extends InstallerViewDefault
  31  {
  32      /**
  33       * Display the view
  34       *
  35       * @param   string  $tpl  Template
  36       *
  37       * @return  void
  38       *
  39       * @since   1.5
  40       */
  41      public function display($tpl = null)
  42      {
  43          if (!$this->getCurrentUser()->authorise('core.admin')) {
  44              throw new NotAllowed(Text::_('JERROR_ALERTNOAUTHOR'), 403);
  45          }
  46  
  47          $paths        = new \stdClass();
  48          $paths->first = '';
  49  
  50          $this->paths  = &$paths;
  51  
  52          PluginHelper::importPlugin('installer');
  53  
  54          parent::display($tpl);
  55      }
  56  
  57      /**
  58       * Add the page title and toolbar.
  59       *
  60       * @return  void
  61       *
  62       * @since   1.6
  63       */
  64      protected function addToolbar()
  65      {
  66          if (ContentHelper::getActions('com_installer')->get('core.manage')) {
  67              ToolbarHelper::link('index.php?option=com_installer&view=manage', 'COM_INSTALLER_TOOLBAR_MANAGE', 'list');
  68              ToolbarHelper::divider();
  69          }
  70  
  71          parent::addToolbar();
  72  
  73          ToolbarHelper::help('Extensions:_Install');
  74      }
  75  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer