QueryFactory
class QueryFactory implements QueryFactoryInterface, EventSubscriberInterface (View source)
Provides a factory for creating entity query objects for the config backend.
Constants
| CONFIG_LOOKUP_PREFIX |
The prefix for the key value collection for fast lookups. |
Properties
| protected ConfigFactoryInterface | $configFactory | The config factory used by the config entity query. |
|
| protected array | $namespaces | The namespace of this class, the parent class etc. |
Methods
Constructs a QueryFactory object.
Instantiates an entity query for a given entity type.
Instantiates an aggregation query object for a given entity type.
Gets the key value store used to store fast lookups.
Updates or adds lookup data.
Creates lookup keys for configuration data.
{@inheritdoc}
Details
__construct(ConfigFactoryInterface $config_factory, KeyValueFactoryInterface $key_value, ConfigManagerInterface $config_manager)
Constructs a QueryFactory object.
QueryInterface
get(EntityTypeInterface $entity_type, string $conjunction)
Instantiates an entity query for a given entity type.
QueryAggregateInterface
getAggregate(EntityTypeInterface $entity_type, string $conjunction)
Instantiates an aggregation query object for a given entity type.
protected KeyValueStoreInterface
getConfigKeyStore(EntityTypeInterface $entity_type)
Gets the key value store used to store fast lookups.
protected
updateConfigKeyStore(ConfigEntityTypeInterface $entity_type, Config $config)
Updates or adds lookup data.
protected
deleteConfigKeyStore(ConfigEntityTypeInterface $entity_type, Config $config)
Deletes lookup data.
protected array
getKeys(Config $config, string $key, string $get_method, ConfigEntityTypeInterface $entity_type)
Creates lookup keys for configuration data.
protected array|null
getValues(Config $config, string $key, string $get_method, array $parts, int $start = 0)
Finds all the values for a configuration key in a configuration object.
onConfigSave(ConfigCrudEvent $event)
Updates configuration entity in the key store.
onConfigDelete(ConfigCrudEvent $event)
Removes configuration entity from key store.
static
getSubscribedEvents()
{@inheritdoc}