/** * Construct an EntityLazyLoadContext object. * * @param \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition * The context definition. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. * @param string $uuid * The UUID of the entity. */ public function __construct(ContextDefinitionInterface $context_definition, EntityManagerInterface $entity_manager, $uuid) { parent::__construct($context_definition); $this->entityManager = $entity_manager; $this->uuid = $uuid; }
/** * Construct an EntityLazyLoadContext object. * * @param \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context_definition * The context definition. * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository * The entity repository. * @param string $uuid * The UUID of the entity. */ public function __construct(ContextDefinitionInterface $context_definition, EntityRepositoryInterface $entity_repository, $uuid) { parent::__construct($context_definition); $this->entityRepository = $entity_repository; $this->uuid = $uuid; }