You are here

protected function ViewsRevisionableIntegrationTest::getArgumentFromEntity in Entity Reference Hierarchy 3.x

Gets the views argument from a given entity.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The entity.

Return value

int The views argument/contextual filter value.

Overrides ViewsIntegrationTest::getArgumentFromEntity

File

tests/src/Kernel/ViewsRevisionableIntegrationTest.php, line 82

Class

ViewsRevisionableIntegrationTest
Defines a class for testing views integration with revisionable entities.

Namespace

Drupal\Tests\entity_hierarchy\Kernel

Code

protected function getArgumentFromEntity(ContentEntityInterface $entity) : int {
  return $entity
    ->getRevisionId();
}