You are here

abstract protected function NegotiatorBase::getRevisionId in JSON:API 8.2

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 src/Revisions/NegotiatorBase.php
Gets the identified revision.
2 methods override NegotiatorBase::getRevisionId()
VersionById::getRevisionId in src/Revisions/VersionById.php
Gets the revision ID.
VersionByRel::getRevisionId in src/Revisions/VersionByRel.php
Gets the revision ID.

File

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);