You are here

protected function EntityHierarchyArgumentPluginBase::loadEntity in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/views/argument/EntityHierarchyArgumentPluginBase.php \Drupal\entity_hierarchy\Plugin\views\argument\EntityHierarchyArgumentPluginBase::loadEntity()

Loads the parent entity from the argument.

Return value

\Drupal\Core\Entity\EntityInterface Parent entity if exists.

3 calls to EntityHierarchyArgumentPluginBase::loadEntity()
HierarchyIsChildOfEntity::query in src/Plugin/views/argument/HierarchyIsChildOfEntity.php
Set up the query for this argument.
HierarchyIsParentOfEntity::query in src/Plugin/views/argument/HierarchyIsParentOfEntity.php
Set up the query for this argument.
HierarchyIsSiblingOfEntity::query in src/Plugin/views/argument/HierarchyIsSiblingOfEntity.php
Set up the query for this argument.
3 methods override EntityHierarchyArgumentPluginBase::loadEntity()
HierarchyIsChildOfEntityRevision::loadEntity in src/Plugin/views/argument/HierarchyIsChildOfEntityRevision.php
Loads the parent entity from the argument.
HierarchyIsParentOfEntityRevision::loadEntity in src/Plugin/views/argument/HierarchyIsParentOfEntityRevision.php
Loads the parent entity from the argument.
HierarchyIsSiblingOfEntityRevision::loadEntity in src/Plugin/views/argument/HierarchyIsSiblingOfEntityRevision.php
Loads the parent entity from the argument.

File

src/Plugin/views/argument/EntityHierarchyArgumentPluginBase.php, line 131

Class

EntityHierarchyArgumentPluginBase
Defines a base argument plugin.

Namespace

Drupal\entity_hierarchy\Plugin\views\argument

Code

protected function loadEntity() {
  return $this->entityTypeManager
    ->getStorage($this
    ->getEntityType())
    ->load($this->argument);
}