/**
* Updates or adds lookup data.
*
* @param \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type
* The entity type.
* @param \Drupal\Core\Config\Config $config
* The configuration object that is being saved.
*/
protected function updateConfigKeyStore(ConfigEntityTypeInterface
$entity_type, Config
$config) { $config_key_store =
$this->
getConfigKeyStore($entity_type);
foreach ($entity_type->
getLookupKeys() as $lookup_key) { foreach ($this->
getKeys($config,
$lookup_key, 'get',
$entity_type) as $key) { $values =
$config_key_store->
get($key,
[]);
if (!
in_array($config->
getName(),
$values, TRUE
)) { $values[] =
$config->
getName();
$config_key_store->
set($key,
$values);
} } } } /**
* Deletes lookup data.
*
* @param \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type
* The entity type.
* @param \Drupal\Core\Config\Config $config
* The configuration object that is being deleted.
*/