getConfigKeyStore example

return $prefix . $id;
            }$ids);
          }
          elseif (in_array($condition['field']$lookup_keys)) {
            $has_added_restrictions = TRUE;
            // If we don't find anything then there are no matches. No point in             // listing anything.             $keys = (array) $condition['value'];
            $keys = array_map(static function D$value) use ($condition) {
              return $condition['field'] . ':' . $value;
            }$keys);
            foreach ($this->getConfigKeyStore()->getMultiple($keys) as $list) {
              $filter_by_names[] = $list;
            }
          }
        }
        // Save the first ID condition that is not an 'IN' or '=' for narrowing         // down later.         elseif (!$id_condition && $condition['field'] == $id_key) {
          $id_condition = $condition;
        }
        // We stop at the first restricting condition on name. In the case where         // there are additional restricting conditions, results will be


  /** * 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);
        }
      }
    }
  }

  
Home | Imprint | This part of the site doesn't use cookies.