diff --git a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueConfigEntityStorage.php b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueConfigEntityStorage.php index b55cee0..858ff51 100644 --- a/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueConfigEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/KeyValueStore/KeyValueConfigEntityStorage.php @@ -22,79 +22,44 @@ class KeyValueConfigEntityStorage extends KeyValueEntityStorage implements ConfigEntityStorageInterface { /** - * The config factory service. - * - * @var \Drupal\Core\Config\ConfigFactoryInterface - */ - protected $configFactory; - - /** - * Constructs a new KeyValueEntityStorage. - * - * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type - * The entity type. - * @param \Drupal\Core\KeyValueStore\KeyValueStoreInterface $key_value_store - * The key value store. - * @param \Drupal\Component\Uuid\UuidInterface $uuid_service - * The UUID service. - * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager - * The language manager. - * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory - * The config factory service. - */ - public function __construct(EntityTypeInterface $entity_type, KeyValueStoreInterface $key_value_store, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory) { - parent::__construct($entity_type, $key_value_store, $uuid_service, $language_manager); - $this->configFactory = $config_factory; - } - - /** * {@inheritdoc} */ - public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { - return new static( - $entity_type, - $container->get('keyvalue')->get('entity_storage__' . $entity_type->id()), - $container->get('uuid'), - $container->get('language_manager'), - $container->get('config.factory') - ); + public static function getIDFromConfigName($config_name, $config_prefix) { + // @todo Implement and test. See https://www.drupal.org/node/2406645 } /** * {@inheritdoc} */ - public static function getIDFromConfigName($config_name, $config_prefix) { } - - /** - * {@inheritdoc} - */ - public function createFromStorageRecord(array $values) { } + public function createFromStorageRecord(array $values) { + // @todo Implement and test. See https://www.drupal.org/node/2406645 + } /** * {@inheritdoc} */ - public function updateFromStorageRecord(ConfigEntityInterface $entity, array $values) { } + public function updateFromStorageRecord(ConfigEntityInterface $entity, array $values) { + // @todo Implement and test. See https://www.drupal.org/node/2406645 + } /** * {@inheritdoc} */ public function loadOverrideFree($id) { - $old_state = $this->configFactory->getOverrideState(); - $this->configFactory->setOverrideState(FALSE); - $entity = $this->load($id); - $this->configFactory->setOverrideState($old_state); - return $entity; + // KeyValueEntityStorage does not support storing and retrieving overrides, + // it does not use the configuration factory. This is just a test method. + // See https://www.drupal.org/node/2393751. + return $this->load($id); } /** * {@inheritdoc} */ public function loadMultipleOverrideFree(array $ids = NULL) { - $old_state = $this->configFactory->getOverrideState(); - $this->configFactory->setOverrideState(FALSE); - $entities = $this->loadMultiple($ids); - $this->configFactory->setOverrideState($old_state); - return $entities; + // KeyValueEntityStorage does not support storing and retrieving overrides, + // it does not use the configuration factory. This is just a test method. + // See https://www.drupal.org/node/2393751. + return $this->loadMultiple($ids); } }