public function ResourceObject::getVersionIdentifier in JSON:API 8.2
Gets a version identifier for the ResourceObject.
Return value
string The version identifier of the resource object, if the resource type is versionable.
File
- src/
JsonApiResource/ ResourceObject.php, line 172
Class
- ResourceObject
- Represents a JSON:API resource object.
Namespace
Drupal\jsonapi\JsonApiResourceCode
public function getVersionIdentifier() {
if (!$this->resourceType
->isVersionable()) {
throw new \LogicException('Cannot get a version identifier for a non-versionable resource.');
}
return $this->versionIdentifier;
}