function EventSubscriber::configEventRecorder
Same name in other branches
- 9 core/modules/config/tests/config_events_test/src/EventSubscriber.php \Drupal\config_events_test\EventSubscriber::configEventRecorder()
- 10 core/modules/language/tests/language_events_test/src/EventSubscriber.php \Drupal\language_events_test\EventSubscriber::configEventRecorder()
- 10 core/modules/config/tests/config_events_test/src/EventSubscriber.php \Drupal\config_events_test\EventSubscriber::configEventRecorder()
- 11.x core/modules/language/tests/language_events_test/src/EventSubscriber.php \Drupal\language_events_test\EventSubscriber::configEventRecorder()
- 11.x 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(),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.