You are here

class ConfigEntityStorageDecorator in Devel 8.2

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php \Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator
  2. 8 webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php \Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator
  3. 4.x webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php \Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator

Class ConfigEntityStorageDecorator

Hierarchy

Expanded class hierarchy of ConfigEntityStorageDecorator

1 file declares its use of ConfigEntityStorageDecorator
EntityManagerWrapper.php in webprofiler/src/Entity/EntityManagerWrapper.php

File

webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php, line 18

Namespace

Drupal\webprofiler\Entity\Decorators\Config
View source
class ConfigEntityStorageDecorator extends EntityDecorator implements ConfigEntityStorageInterface, ImportableEntityStorageInterface, EntityHandlerInterface {

  /**
   * @param ConfigEntityStorageInterface $controller
   */
  public function __construct(ConfigEntityStorageInterface $controller) {
    parent::__construct($controller);
    $this->entities = [];
  }

  /**
   * {@inheritdoc}
   */
  public function resetCache(array $ids = NULL) {
    $this
      ->getOriginalObject()
      ->resetCache($ids);
  }

  /**
   * {@inheritdoc}
   */
  public function loadMultiple(array $ids = NULL) {
    $entities = $this
      ->getOriginalObject()
      ->loadMultiple($ids);
    $this->entities = array_merge($this->entities, $entities);
    return $entities;
  }

  /**
   * {@inheritdoc}
   */
  public function load($id) {
    $entity = $this
      ->getOriginalObject()
      ->load($id);
    $this->entities[$id] = $entity;
    return $entity;
  }

  /**
   * {@inheritdoc}
   */
  public function loadUnchanged($id) {
    return $this
      ->getOriginalObject()
      ->loadUnchanged($id);
  }

  /**
   * {@inheritdoc}
   */
  public function loadRevision($revision_id) {
    return $this
      ->getOriginalObject()
      ->loadRevision($revision_id);
  }

  /**
   * {@inheritdoc}
   */
  public function deleteRevision($revision_id) {
    $this
      ->getOriginalObject()
      ->deleteRevision($revision_id);
  }

  /**
   * {@inheritdoc}
   */
  public function loadByProperties(array $values = []) {
    $entities = $this
      ->getOriginalObject()
      ->loadByProperties($values);
    $this->entities = array_merge($this->entities, $entities);
    return $entities;
  }

  /**
   * {@inheritdoc}
   */
  public function create(array $values = []) {
    return $this
      ->getOriginalObject()
      ->create($values);
  }

  /**
   * {@inheritdoc}
   */
  public function delete(array $entities) {
    $this
      ->getOriginalObject()
      ->delete($entities);
  }

  /**
   * {@inheritdoc}
   */
  public function save(EntityInterface $entity) {
    return $this
      ->getOriginalObject()
      ->save($entity);
  }

  /**
   * {@inheritdoc}
   */
  public function hasData() {
    return $this
      ->getOriginalObject()
      ->hasData();
  }

  /**
   * {@inheritdoc}
   */
  public function getQuery($conjunction = 'AND') {
    return $this
      ->getOriginalObject()
      ->getQuery($conjunction);
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityTypeId() {
    return $this
      ->getOriginalObject()
      ->getEntityTypeId();
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityType() {
    return $this
      ->getOriginalObject()
      ->getEntityType();
  }

  /**
   * {@inheritdoc}
   */
  public static function getIDFromConfigName($config_name, $config_prefix) {
    return substr($config_name, strlen($config_prefix . '.'));
  }

  /**
   * {@inheritdoc}
   */
  public function createFromStorageRecord(array $values) {
    return $this
      ->getOriginalObject()
      ->createFromStorageRecord($values);
  }

  /**
   * {@inheritdoc}
   */
  public function updateFromStorageRecord(ConfigEntityInterface $entity, array $values) {
    return $this
      ->getOriginalObject()
      ->updateFromStorageRecord($entity, $values);
  }

  /**
   * {@inheritdoc}
   */
  public function getAggregateQuery($conjunction = 'AND') {
    return $this
      ->getOriginalObject()
      ->getAggregateQuery($conjunction);
  }

  /**
   * {@inheritdoc}
   */
  public function loadOverrideFree($id) {
    return $this
      ->getOriginalObject()
      ->loadOverrideFree($id);
  }

  /**
   * {@inheritdoc}
   */
  public function loadMultipleOverrideFree(array $ids = NULL) {
    return $this
      ->getOriginalObject()
      ->loadMultipleOverrideFree($ids);
  }

  /**
   * {@inheritdoc}
   */
  public function importCreate($name, Config $new_config, Config $old_config) {
    $this
      ->getOriginalObject()
      ->importCreate($name, $new_config, $old_config);
  }

  /**
   * {@inheritdoc}
   */
  public function importUpdate($name, Config $new_config, Config $old_config) {
    $this
      ->getOriginalObject()
      ->importUpdate($name, $new_config, $old_config);
  }

  /**
   * {@inheritdoc}
   */
  public function importDelete($name, Config $new_config, Config $old_config) {
    $this
      ->getOriginalObject()
      ->importDelete($name, $new_config, $old_config);
  }

  /**
   * {@inheritdoc}
   */
  public function importRename($old_name, Config $new_config, Config $old_config) {
    $this
      ->getOriginalObject()
      ->importRename($old_name, $new_config, $old_config);
  }

  /**
   * {@inheritdoc}
   */
  public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) {
    return new static($entity_type, $container
      ->get('config.factory'), $container
      ->get('uuid'), $container
      ->get('language_manager'));
  }

  /**
   * {@inheritdoc}
   */
  public function restore(EntityInterface $entity) {
    $this
      ->getOriginalObject()
      ->restore($entity);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigEntityStorageDecorator::create public function Constructs a new entity object, without permanently saving it. Overrides EntityStorageInterface::create
ConfigEntityStorageDecorator::createFromStorageRecord public function Creates a configuration entity from storage values. Overrides ConfigEntityStorageInterface::createFromStorageRecord
ConfigEntityStorageDecorator::createInstance public static function Instantiates a new instance of this entity handler. Overrides EntityHandlerInterface::createInstance
ConfigEntityStorageDecorator::delete public function Deletes permanently saved entities. Overrides EntityStorageInterface::delete
ConfigEntityStorageDecorator::deleteRevision public function Delete a specific entity revision. Overrides EntityStorageInterface::deleteRevision
ConfigEntityStorageDecorator::getAggregateQuery public function Gets an aggregated query instance. Overrides EntityStorageInterface::getAggregateQuery
ConfigEntityStorageDecorator::getEntityType public function Gets the entity type definition. Overrides EntityStorageInterface::getEntityType
ConfigEntityStorageDecorator::getEntityTypeId public function Gets the entity type ID. Overrides EntityStorageInterface::getEntityTypeId
ConfigEntityStorageDecorator::getIDFromConfigName public static function Extracts the configuration entity ID from the full configuration name. Overrides ConfigEntityStorageInterface::getIDFromConfigName
ConfigEntityStorageDecorator::getQuery public function Gets an entity query instance. Overrides EntityStorageInterface::getQuery
ConfigEntityStorageDecorator::hasData public function Determines if the storage contains any data. Overrides EntityStorageInterface::hasData
ConfigEntityStorageDecorator::importCreate public function Creates entities upon synchronizing configuration changes. Overrides ImportableEntityStorageInterface::importCreate
ConfigEntityStorageDecorator::importDelete public function Delete entities upon synchronizing configuration changes. Overrides ImportableEntityStorageInterface::importDelete
ConfigEntityStorageDecorator::importRename public function Renames entities upon synchronizing configuration changes. Overrides ImportableEntityStorageInterface::importRename
ConfigEntityStorageDecorator::importUpdate public function Updates entities upon synchronizing configuration changes. Overrides ImportableEntityStorageInterface::importUpdate
ConfigEntityStorageDecorator::load public function Loads one entity. Overrides EntityStorageInterface::load
ConfigEntityStorageDecorator::loadByProperties public function Load entities by their property values. Overrides EntityStorageInterface::loadByProperties
ConfigEntityStorageDecorator::loadMultiple public function Loads one or more entities. Overrides EntityStorageInterface::loadMultiple
ConfigEntityStorageDecorator::loadMultipleOverrideFree public function Loads one or more entities in their original form without overrides. Overrides ConfigEntityStorageInterface::loadMultipleOverrideFree
ConfigEntityStorageDecorator::loadOverrideFree public function Loads one entity in their original form without overrides. Overrides ConfigEntityStorageInterface::loadOverrideFree
ConfigEntityStorageDecorator::loadRevision public function Load a specific entity revision. Overrides EntityStorageInterface::loadRevision
ConfigEntityStorageDecorator::loadUnchanged public function Loads an unchanged entity from the database. Overrides EntityStorageInterface::loadUnchanged
ConfigEntityStorageDecorator::resetCache public function Resets the internal, static entity cache. Overrides EntityStorageInterface::resetCache
ConfigEntityStorageDecorator::restore public function Restores a previously saved entity. Overrides EntityStorageInterface::restore
ConfigEntityStorageDecorator::save public function Saves the entity permanently. Overrides EntityStorageInterface::save
ConfigEntityStorageDecorator::updateFromStorageRecord public function Updates a configuration entity from storage values. Overrides ConfigEntityStorageInterface::updateFromStorageRecord
ConfigEntityStorageDecorator::__construct public function Overrides Decorator::__construct
Decorator::$object protected property @var
Decorator::getOriginalObject public function Return the original (i.e. non decorated) object.
Decorator::isCallable public function Returns true if $method is a PHP callable.
Decorator::__call public function
Decorator::__get public function
EntityDecorator::$entities protected property
EntityDecorator::getEntities public function
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.