- md5
- 4d7bd6c9399ee31bd9a7f8a7b008732d
- sha1
- 4e4f603024422ca2ef9ed1a6a9ae352adbe964bb
- sha256
- a236dbac441e95d2285fb443858aece8e3cbc167db817172031d6a2358e0b6ed
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
<?php
/**
* @package Joomla.Administrator
* @subpackage com_modules
*
* @copyright (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Modules\Administrator\Extension;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Association\AssociationServiceTrait;
use Joomla\CMS\Extension\BootableExtensionInterface;
use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
use Joomla\Component\Modules\Administrator\Service\HTML\Modules;
use Joomla\Database\DatabaseInterface;
use Psr\Container\ContainerInterface;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Component class for com_modules
*
* @since 4.0.0
*/
class ModulesComponent extends MVCComponent implements BootableExtensionInterface, AssociationServiceInterface
{
use AssociationServiceTrait;
use HTMLRegistryAwareTrait;
/**
* Booting the extension. This is the function to set up the environment of the extension like
* registering new class loaders, etc.
*
* If required, some initial set up can be done from services of the container, eg.
* registering HTML services.
*
* @param ContainerInterface $container The container
*
* @return void
*
* @since 4.0.0
*/
public function boot(ContainerInterface $container)
{
$modules = new Modules();
$modules->setDatabase($container->get(DatabaseInterface::class));
$this->getRegistry()->register('modules', $modules);
}
}
The same content is in 28 releases, Joomla 6.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.