function EntityRepositoryInterface::getCanonicalMultiple

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php \Drupal\Core\Entity\EntityRepositoryInterface::getCanonicalMultiple()
  2. 10 core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php \Drupal\Core\Entity\EntityRepositoryInterface::getCanonicalMultiple()
  3. 11.x core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php \Drupal\Core\Entity\EntityRepositoryInterface::getCanonicalMultiple()

Retrieves the canonical entity variants matching the specified context.

Parameters

string $entity_type_id: The entity type identifier.

int[]|string[] $entity_ids: An array of entity identifiers.

\Drupal\Core\Plugin\Context\ContextInterface[] $contexts: (optional) An associative array of objects representing the contexts the entity will be edited in keyed by fully qualified context ID. Defaults to the currently available contexts.

Return value

\Drupal\Core\Entity\EntityInterface An array of entity object variants keyed by entity ID.

See also

getCanonical()

2 methods override EntityRepositoryInterface::getCanonicalMultiple()
EntityManager::getCanonicalMultiple in core/lib/Drupal/Core/Entity/EntityManager.php
EntityRepository::getCanonicalMultiple in core/lib/Drupal/Core/Entity/EntityRepository.php
Retrieves the canonical entity variants matching the specified context.

File

core/lib/Drupal/Core/Entity/EntityRepositoryInterface.php, line 168

Class

EntityRepositoryInterface
Provides an interface for an entity repository.

Namespace

Drupal\Core\Entity

Code

public function getCanonicalMultiple($entity_type_id, array $entity_ids, array $contexts = NULL);

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