[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_privacy/src/Extension/ -> PrivacyComponent.php (source)

   1  <?php
   2  
   3  /**
   4   * @package     Joomla.Administrator
   5   * @subpackage  com_privacy
   6   *
   7   * @copyright   (C) 2019 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\Privacy\Administrator\Extension;
  12  
  13  use Joomla\CMS\Component\Router\RouterServiceInterface;
  14  use Joomla\CMS\Component\Router\RouterServiceTrait;
  15  use Joomla\CMS\Extension\BootableExtensionInterface;
  16  use Joomla\CMS\Extension\MVCComponent;
  17  use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
  18  use Joomla\Component\Privacy\Administrator\Service\HTML\Privacy;
  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_privacy
  27   *
  28   * @since  4.0.0
  29   */
  30  class PrivacyComponent extends MVCComponent implements BootableExtensionInterface, RouterServiceInterface
  31  {
  32      use HTMLRegistryAwareTrait;
  33      use RouterServiceTrait;
  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('privacy', new Privacy());
  51      }
  52  }


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