function ResourceVersionRouteEnhancer::isValidVersionIdentifier
Same name in other branches
- 8.9.x core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php \Drupal\jsonapi\Revisions\ResourceVersionRouteEnhancer::isValidVersionIdentifier()
- 10 core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php \Drupal\jsonapi\Revisions\ResourceVersionRouteEnhancer::isValidVersionIdentifier()
- 11.x core/modules/jsonapi/src/Revisions/ResourceVersionRouteEnhancer.php \Drupal\jsonapi\Revisions\ResourceVersionRouteEnhancer::isValidVersionIdentifier()
Validates the user input.
Parameters
string $resource_version: The requested resource version identifier.
Return value
bool TRUE if the received resource version value is valid, FALSE otherwise.
1 call to ResourceVersionRouteEnhancer::isValidVersionIdentifier()
- ResourceVersionRouteEnhancer::enhance in core/
modules/ jsonapi/ src/ Revisions/ ResourceVersionRouteEnhancer.php - Updates the defaults for a route definition based on the request.
File
-
core/
modules/ jsonapi/ src/ Revisions/ ResourceVersionRouteEnhancer.php, line 182
Class
- ResourceVersionRouteEnhancer
- Loads an appropriate revision for the requested resource version.
Namespace
Drupal\jsonapi\RevisionsCode
protected static function isValidVersionIdentifier($resource_version) {
return preg_match(static::VERSION_IDENTIFIER_VALIDATOR, $resource_version) === 1;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.