Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add privacy component extension class
- Loading branch information
Michael Babker
committed
Apr 14, 2019
1 parent
a3b3b3c
commit b2f0802
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
administrator/components/com_privacy/Extension/PrivacyComponent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_privacy | ||
* | ||
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
namespace Joomla\Component\Privacy\Administrator\Extension; | ||
|
||
defined('JPATH_PLATFORM') or die; | ||
|
||
use Joomla\CMS\Extension\BootableExtensionInterface; | ||
use Joomla\CMS\Extension\MVCComponent; | ||
use Joomla\CMS\HTML\HTMLRegistryAwareTrait; | ||
use Joomla\Component\Privacy\Administrator\Service\HTML\Privacy; | ||
use Psr\Container\ContainerInterface; | ||
|
||
/** | ||
* Component class for com_privacy | ||
* | ||
* @since __DEPLOY_VERSION__ | ||
*/ | ||
class PrivacyComponent 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('privacy', new Privacy()); | ||
} | ||
} |