public function QueryFactory::onConfigDelete in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php \Drupal\Core\Config\Entity\Query\QueryFactory::onConfigDelete()
Removes configuration entity from key store.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The configuration event.
File
- core/
lib/ Drupal/ Core/ Config/ Entity/ Query/ QueryFactory.php, line 245 - Contains \Drupal\Core\Config\Entity\Query\QueryFactory.
Class
- QueryFactory
- Provides a factory for creating entity query objects for the config backend.
Namespace
Drupal\Core\Config\Entity\QueryCode
public function onConfigDelete(ConfigCrudEvent $event) {
$saved_config = $event
->getConfig();
$entity_type_id = $this->configManager
->getEntityTypeIdByName($saved_config
->getName());
if ($entity_type_id) {
$entity_type = $this->configManager
->getEntityManager()
->getDefinition($entity_type_id);
$this
->deleteConfigKeyStore($entity_type, $saved_config);
}
}