CoreFiles by mySites.guru
TemplatesComponent.php49 lines, 1,392 bytes, from Joomla_5.2.2-Stable-Full_Package.zip
Raw History Compare with 5.2.1
md5
9a9c6f2152d81d3e8e3da2f164ef0029
sha1
d97c444798cc63054fae96dd85faa00d92cd44d4
sha256
03156c6baf560c8bbced2e056b1e5fb31047606cce0a49a6edf655850beb391d
<?php

/**
 * @package     Joomla.Administrator
 * @subpackage  com_templates
 *
 * @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\Templates\Administrator\Extension;

use Joomla\CMS\Extension\BootableExtensionInterface;
use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\HTML\HTMLRegistryAwareTrait;
use Joomla\Component\Templates\Administrator\Service\HTML\Templates;
use Psr\Container\ContainerInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

/**
 * Component class for com_templates
 *
 * @since  4.0.0
 */
class TemplatesComponent extends MVCComponent implements BootableExtensionInterface
{
    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)
    {
        $this->getRegistry()->register('templates', new Templates());
    }
}

The same content is in 155 releases, Joomla 5.0.0-alpha1 to 6.2.1-rc1. See them all, or every version of this file.