function NegotiatorBase::getRevisionId
Same name in other branches
- 9 core/modules/jsonapi/src/Revisions/NegotiatorBase.php \Drupal\jsonapi\Revisions\NegotiatorBase::getRevisionId()
- 10 core/modules/jsonapi/src/Revisions/NegotiatorBase.php \Drupal\jsonapi\Revisions\NegotiatorBase::getRevisionId()
- 11.x 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\RevisionsCode
protected abstract function getRevisionId(EntityInterface $entity, $version_argument);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.