public EntityRepositoryInterface::loadEntityByConfigTarget($entity_type_id, $target)
Loads an entity by the config target identifier.
string $entity_type_id: The entity type ID to load from.
string $target: The configuration target to load, as returned from \Drupal\Core\Entity\EntityInterface::getConfigTarget().
\Drupal\Core\Entity\EntityInterface|null The entity object, or NULL if there is no entity with the given config target identifier.
\Drupal\Core\Entity\EntityStorageException Thrown if the target identifier is a UUID but the entity type does not support UUIDs.
\Drupal\Core\Entity\EntityInterface::getConfigTarget()
public function loadEntityByConfigTarget($entity_type_id, $target);
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityRepositoryInterface.php/function/EntityRepositoryInterface::loadEntityByConfigTarget/8.1.x