function EventSubscriber::onConfigDelete
Same name in other branches
- 8.9.x core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigDelete()
- 10 core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigDelete()
- 11.x core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigDelete()
Reacts to a config delete and records information in state for testing.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The event.
File
-
core/
modules/ config/ tests/ config_import_test/ src/ EventSubscriber.php, line 122
Class
- EventSubscriber
- Config import subscriber for config import events.
Namespace
Drupal\config_import_testCode
public function onConfigDelete(ConfigCrudEvent $event) {
$config = $event->getConfig();
if ($config->getName() == 'automated_cron.settings') {
$value = $this->state
->get('ConfigImportUITest.automated_cron.settings.delete', 0);
$this->state
->set('ConfigImportUITest.automated_cron.settings.delete', $value + 1);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.