VersionById.php in Drupal 8
File
core/modules/jsonapi/src/Revisions/VersionById.php
View source
<?php
namespace Drupal\jsonapi\Revisions;
use Drupal\Core\Entity\EntityInterface;
class VersionById extends NegotiatorBase implements VersionNegotiatorInterface {
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;
}
}
Classes
Name |
Description |
VersionById |
Defines a revision ID implementation for entity revision ID values. |