HierarchyIsSiblingOfEntityRevision.php in Entity Reference Hierarchy 8.2
Same filename and directory in other branches
File
src/Plugin/views/argument/HierarchyIsSiblingOfEntityRevision.phpView source
<?php
namespace Drupal\entity_hierarchy\Plugin\views\argument;
/**
* Argument to limit to parent of a revision.
*
* @ingroup views_argument_handlers
*
* @ViewsArgument("entity_hierarchy_argument_is_sibling_of_entity_revision")
*/
class HierarchyIsSiblingOfEntityRevision extends HierarchyIsSiblingOfEntity {
/**
* {@inheritdoc}
*/
protected function loadEntity() {
$storage = $this->entityTypeManager
->getStorage($this
->getEntityType());
return $storage
->loadRevision($this->argument) ?: $storage
->load($this->argument);
}
}
Classes
Name | Description |
---|---|
HierarchyIsSiblingOfEntityRevision | Argument to limit to parent of a revision. |