You are here

abstract protected function NegotiatorBase::getRevisionId in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/src/Revisions/NegotiatorBase.php \Drupal\jsonapi\Revisions\NegotiatorBase::getRevisionId()
  2. 10 core/modules/jsonapi/src/Revisions/NegotiatorBase.php \Drupal\jsonapi\Revisions\NegotiatorBase::getRevisionId()

Gets the revision ID.

Parameters

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

string $version_argument: A value used to derive a revision ID for the given entity.

Return value

int The revision ID.

Throws

\Drupal\jsonapi\Revisions\VersionNotFoundException When the revision does not exist.

\Drupal\jsonapi\Revisions\InvalidVersionIdentifierException When the revision ID is not valid.

1 call to NegotiatorBase::getRevisionId()
NegotiatorBase::getRevision in core/modules/jsonapi/src/Revisions/NegotiatorBase.php
Gets the identified revision.
2 methods override NegotiatorBase::getRevisionId()
VersionById::getRevisionId in core/modules/jsonapi/src/Revisions/VersionById.php
Gets the revision ID.
VersionByRel::getRevisionId in core/modules/jsonapi/src/Revisions/VersionByRel.php
Gets the revision ID.

File

core/modules/jsonapi/src/Revisions/NegotiatorBase.php, line 52

Class

NegotiatorBase
Base implementation for version negotiators.

Namespace

Drupal\jsonapi\Revisions

Code

protected abstract function getRevisionId(EntityInterface $entity, $version_argument);