Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. VersionById.php

function VersionById::getRevisionId

Overrides NegotiatorBase::getRevisionId

File

core/modules/jsonapi/src/Revisions/VersionById.php, line 21

Class

VersionById
Defines a revision ID implementation for entity revision ID values.

Namespace

Drupal\jsonapi\Revisions

Code

protected function getRevisionId(EntityInterface $entity, $version_argument) {
    if (!is_numeric($version_argument)) {
        throw new InvalidVersionIdentifierException('The revision ID must be an integer.');
    }
    return $version_argument;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal