-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModeraConfigBundle.php
32 lines (26 loc) · 1.13 KB
/
ModeraConfigBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
namespace Modera\ConfigBundle;
use Modera\ExpanderBundle\Ext\ExtensionPoint;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @author Sergei Lissovski <[email protected]>
* @copyright 2014 Modera Foundation
*/
class ModeraConfigBundle extends Bundle
{
public const CONFIG_KEY = 'modera_config.config';
public function build(ContainerBuilder $container): void
{
$configEntriesProvider = new ExtensionPoint('modera_config.config_entries');
$configEntriesProvider->setDescription(
'Allow to contribute new configuration properties. See ConfigurationEntryInterface.'
);
$container->addCompilerPass($configEntriesProvider->createCompilerPass());
$listenersExtensionPoint = new ExtensionPoint('modera_config.notification_center_listeners');
$listenersExtensionPoint->setDescription(
'Allows you to create listeners to perform custom operations when configuration entry has changes.'
);
$container->addCompilerPass($listenersExtensionPoint->createCompilerPass());
}
}