public function QueryFactory::onConfigSave

public QueryFactory::onConfigSave(ConfigCrudEvent $event)

Updates configuration entity in the key store.

Parameters

ConfigCrudEvent $event: The configuration event.

File

core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php, line 225

Class

QueryFactory
Provides a factory for creating entity query objects for the config backend.

Namespace

Drupal\Core\Config\Entity\Query

Code

public function onConfigSave(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->updateConfigKeyStore($entity_type, $saved_config);
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Config!Entity!Query!QueryFactory.php/function/QueryFactory::onConfigSave/8.1.x