public function EventSubscriber::configEventRecorder in Drupal 9
Same name and namespace in other branches
- 8 core/modules/config/tests/config_events_test/src/EventSubscriber.php \Drupal\config_events_test\EventSubscriber::configEventRecorder()
Reacts to config event.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The configuration event.
string $name: The event name.
File
- core/
modules/ config/ tests/ config_events_test/ src/ EventSubscriber.php, line 37
Class
Namespace
Drupal\config_events_testCode
public function configEventRecorder(ConfigCrudEvent $event, $name) {
$config = $event
->getConfig();
$this->state
->set('config_events_test.event', [
'event_name' => $name,
'current_config_data' => $config
->get(),
'original_config_data' => $config
->getOriginal(),
'raw_config_data' => $config
->getRawData(),
]);
}