class ConfigTestStorage

Same name and namespace in other branches
  1. 11.x core/modules/config/tests/config_test/src/ConfigTestStorage.php \Drupal\config_test\ConfigTestStorage
  2. 10 core/modules/config/tests/config_test/src/ConfigTestStorage.php \Drupal\config_test\ConfigTestStorage
  3. 9 core/modules/config/tests/config_test/src/ConfigTestStorage.php \Drupal\config_test\ConfigTestStorage
  4. 8.9.x core/modules/config/tests/config_test/src/ConfigTestStorage.php \Drupal\config_test\ConfigTestStorage

Storage class for testing configuration entity storage.

Hierarchy

Expanded class hierarchy of ConfigTestStorage

2 files declare their use of ConfigTestStorage
ConfigQueryTest.php in core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php
ConfigTest.php in core/modules/config/tests/config_test/src/Entity/ConfigTest.php

File

core/modules/config/tests/config_test/src/ConfigTestStorage.php, line 13

Namespace

Drupal\config_test
View source
class ConfigTestStorage extends ConfigEntityStorage {
  
  /**
   * {@inheritdoc}
   */
  public function importCreate($name, Config $new_config, Config $old_config) {
    // Set a global value we can check in test code.
    $GLOBALS['hook_config_import'] = __METHOD__;
    return parent::importCreate($name, $new_config, $old_config);
  }
  
  /**
   * {@inheritdoc}
   */
  public function importUpdate($name, Config $new_config, Config $old_config) {
    // Set a global value we can check in test code.
    $GLOBALS['hook_config_import'] = __METHOD__;
    return parent::importUpdate($name, $new_config, $old_config);
  }
  
  /**
   * {@inheritdoc}
   */
  public function importDelete($name, Config $new_config, Config $old_config) {
    // Set a global value we can check in test code.
    $GLOBALS['hook_config_import'] = __METHOD__;
    return parent::importDelete($name, $new_config, $old_config);
  }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ConfigEntityStorage::$configFactory protected property The config factory service.
ConfigEntityStorage::$configStorage protected property The config storage service.
ConfigEntityStorage::$languageManager protected property The language manager.
ConfigEntityStorage::$overrideFree protected property Determines if the underlying configuration is retrieved override free.
ConfigEntityStorage::$uuidKey protected property
ConfigEntityStorage::buildCacheId protected function
ConfigEntityStorage::createFromStorageRecord public function
ConfigEntityStorage::createInstance public static function
ConfigEntityStorage::doCreate protected function
ConfigEntityStorage::doDelete protected function
ConfigEntityStorage::doLoadMultiple protected function
ConfigEntityStorage::doSave protected function
ConfigEntityStorage::getIDFromConfigName public static function
ConfigEntityStorage::getPrefix protected function Returns the prefix used to create the configuration name.
ConfigEntityStorage::getQueryServiceName protected function
ConfigEntityStorage::has protected function
ConfigEntityStorage::hasData public function
ConfigEntityStorage::importRename public function
ConfigEntityStorage::invokeHook protected function Invokes a hook on behalf of the entity.
ConfigEntityStorage::loadMultipleOverrideFree public function
ConfigEntityStorage::loadOverrideFree public function
ConfigEntityStorage::mapToStorageRecord protected function Maps from an entity object to the storage record.
ConfigEntityStorage::MAX_ID_LENGTH constant Length limit of the configuration entity ID.
ConfigEntityStorage::resetCache public function
ConfigEntityStorage::save public function Implements Drupal\Core\Entity\EntityStorageInterface::save().
ConfigEntityStorage::updateFromStorageRecord public function
ConfigEntityStorage::_doCreateFromStorageRecord protected function Helps create a configuration entity from storage values.
ConfigEntityStorage::__construct public function Constructs a ConfigEntityStorage object.
ConfigTestStorage::importCreate public function Creates entities upon synchronizing configuration changes. Overrides ConfigEntityStorage::importCreate
ConfigTestStorage::importDelete public function Delete entities upon synchronizing configuration changes. Overrides ConfigEntityStorage::importDelete
ConfigTestStorage::importUpdate public function Updates entities upon synchronizing configuration changes. Overrides ConfigEntityStorage::importUpdate
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function
DependencySerializationTrait::__wakeup public function
EntityHandlerBase::$moduleHandler protected property The module handler to invoke hooks on.
EntityHandlerBase::moduleHandler protected function Gets the module handler.
EntityHandlerBase::setModuleHandler public function Sets the module handler for this handler.
EntityStorageBase::$baseEntityClass private property Name of the base entity class.
EntityStorageBase::$entityIdsToLoad protected property Entity IDs awaiting loading.
EntityStorageBase::$entityType protected property Information about the entity type.
EntityStorageBase::$entityTypeId protected property Entity type ID for this storage.
EntityStorageBase::$idKey protected property Name of the entity's ID field in the entity database table.
EntityStorageBase::$langcodeKey protected property The name of the entity langcode property.
EntityStorageBase::$memoryCache protected property The memory cache.
EntityStorageBase::$memoryCacheTag protected property The memory cache tag.
EntityStorageBase::$uuidService protected property The UUID service.
EntityStorageBase::buildPropertyQuery protected function Builds an entity query.
EntityStorageBase::create public function
EntityStorageBase::delete public function
EntityStorageBase::doPostSave protected function Performs post save entity processing.
EntityStorageBase::doPreSave protected function Performs presave entity processing.
EntityStorageBase::getAggregateQuery public function
EntityStorageBase::getEntitiesByClass protected function Indexes the given array of entities by their class name and ID.
EntityStorageBase::getEntityClass public function
EntityStorageBase::getEntityType public function
EntityStorageBase::getEntityTypeId public function
EntityStorageBase::getFromStaticCache protected function Gets entities from the static cache.
EntityStorageBase::getQuery public function
EntityStorageBase::load public function
EntityStorageBase::loadByProperties public function
EntityStorageBase::loadMultiple public function
EntityStorageBase::loadUnchanged public function
EntityStorageBase::mapFromStorageRecords protected function Maps from storage records to entity objects.
EntityStorageBase::postLoad protected function Attaches data to entities upon loading.
EntityStorageBase::preLoad protected function Gathers entities from a 'preload' step.
EntityStorageBase::restore public function
EntityStorageBase::setStaticCache protected function Stores entities in the static entity cache.
EntityStorageInterface::FIELD_LOAD_CURRENT constant Load the most recent version of an entity's field data.
EntityStorageInterface::FIELD_LOAD_REVISION constant Load the version of an entity's field data specified in the entity.
StringTranslationTrait::$stringTranslation protected property The string translation service.
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use.
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.