[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_menus/src/Extension/ -> MenusComponent.php (source)

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


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