class ConfigRewriteInstallSubscriber in Configuration Rewrite 8.2
Class ConfigRewriteInstallSubscriber.
@package Drupal\config_rewrite
Hierarchy
- class \Drupal\config_rewrite\EventSubscriber\ConfigRewriteInstallSubscriber implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
Expanded class hierarchy of ConfigRewriteInstallSubscriber
1 string reference to 'ConfigRewriteInstallSubscriber'
1 service uses ConfigRewriteInstallSubscriber
File
- src/
EventSubscriber/ ConfigRewriteInstallSubscriber.php, line 15
Namespace
Drupal\config_rewrite\EventSubscriberView source
class ConfigRewriteInstallSubscriber implements EventSubscriberInterface {
/**
* @var \Drupal\config_rewrite\ConfigRewriter
*/
protected $configRewriter;
/**
* ConfigRewriteInstallSubscriber constructor.
* @param \Drupal\config_rewrite\ConfigRewriter $config_rewriter
*/
public function __construct(ConfigRewriter $config_rewriter) {
$this->configRewriter = $config_rewriter;
}
/**
* {@inheritdoc}
*/
static function getSubscribedEvents() {
$events[ModuleEvents::MODULE_INSTALLED][] = [
'module_install_config_rewrite',
];
return $events;
}
/**
* @param \Symfony\Component\EventDispatcher\Event $event
*/
public function module_install_config_rewrite(Event $event) {
$this->configRewriter
->rewriteModuleConfig($event
->getModule());
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigRewriteInstallSubscriber:: |
protected | property | ||
ConfigRewriteInstallSubscriber:: |
static | function | Returns an array of event names this subscriber wants to listen to. | |
ConfigRewriteInstallSubscriber:: |
public | function | ||
ConfigRewriteInstallSubscriber:: |
public | function | ConfigRewriteInstallSubscriber constructor. |