[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_admin/src/Extension/ -> AdminComponent.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_admin
   6   *
   7   * @copyright   (C) 2018 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\Admin\Administrator\Extension;
  12  
  13  use Joomla\CMS\Extension\BootableExtensionInterface;
  14  use Joomla\CMS\Extension\MVCComponent;
  15  use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
  16  use Joomla\Component\Admin\Administrator\Service\HTML\Configuration;
  17  use Joomla\Component\Admin\Administrator\Service\HTML\Directory;
  18  use Joomla\Component\Admin\Administrator\Service\HTML\PhpSetting;
  19  use Joomla\Component\Admin\Administrator\Service\HTML\System;
  20  use Psr\Container\ContainerInterface;
  21  
  22  // phpcs:disable PSR1.Files.SideEffects
  23  \defined('JPATH_PLATFORM') or die;
  24  // phpcs:enable PSR1.Files.SideEffects
  25  
  26  /**
  27   * Component class for com_admin
  28   *
  29   * @since  4.0.0
  30   */
  31  class AdminComponent extends MVCComponent implements BootableExtensionInterface
  32  {
  33      use HTMLRegistryAwareTrait;
  34  
  35      /**
  36       * Booting the extension. This is the function to set up the environment of the extension like
  37       * registering new class loaders, etc.
  38       *
  39       * If required, some initial set up can be done from services of the container, eg.
  40       * registering HTML services.
  41       *
  42       * @param   ContainerInterface  $container  The container
  43       *
  44       * @return  void
  45       *
  46       * @since   4.0.0
  47       */
  48      public function boot(ContainerInterface $container)
  49      {
  50          $this->getRegistry()->register('system', new System());
  51          $this->getRegistry()->register('phpsetting', new PhpSetting());
  52          $this->getRegistry()->register('directory', new Directory());
  53          $this->getRegistry()->register('configuration', new Configuration());
  54      }
  55  }


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