[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_modules/src/Extension/ -> ModulesComponent.php (source)

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


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