public function getRevision(EntityInterface
$entity,
$resource_version_identifier) { try { [$version_negotiator_name,
$version_argument] =
explode(VersionNegotiator::SEPARATOR,
$resource_version_identifier, 2
);
if (!
isset($this->negotiators
[$version_negotiator_name])) { static::
throwBadRequestHttpException($resource_version_identifier);
} return $this->negotiators
[$version_negotiator_name]->
getRevision($entity,
$version_argument);
} catch (VersionNotFoundException
$exception) { static::
throwNotFoundHttpException($entity,
$resource_version_identifier);
} catch (InvalidVersionIdentifierException
$exception) { static::
throwBadRequestHttpException($resource_version_identifier);
} } /**
* Throws a cacheable error exception.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity for which a revision was requested.
* @param string $resource_version_identifier
* The user input for the revision negotiation.
*
* @throws \Drupal\Core\Http\Exception\CacheableNotFoundHttpException
*/