VersionById.php in JSON:API 8.2
File
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. |