You are here

public function ConfigEntityStorageDecorator::load in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php \Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator::load()
  2. 8 webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php \Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator::load()
  3. 8.2 webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php \Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator::load()

Loads one entity.

Parameters

mixed $id: The ID of the entity to load.

Return value

\Drupal\Core\Entity\EntityInterface|null An entity object. NULL if no matching entity is found.

Overrides EntityStorageInterface::load

File

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

Class

ConfigEntityStorageDecorator
Class ConfigEntityStorageDecorator.

Namespace

Drupal\webprofiler\Entity\Decorators\Config

Code

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