function EntityLazyLoadContext::__construct

Same name in other branches
  1. 8.x-3.x src/Context/EntityLazyLoadContext.php \Drupal\ctools\Context\EntityLazyLoadContext::__construct()

Construct an EntityLazyLoadContext object.

Parameters

\Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition: The context definition.

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

string $uuid: The UUID of the entity.

Overrides Context::__construct

File

src/Context/EntityLazyLoadContext.php, line 38

Class

EntityLazyLoadContext
Defines context that loads entity on demand.

Namespace

Drupal\ctools\Context

Code

public function __construct(ContextDefinitionInterface $context_definition, EntityRepositoryInterface $entity_repository, $uuid) {
    parent::__construct($context_definition);
    $this->entityRepository = $entity_repository;
    $this->uuid = $uuid;
}