function Routes::hasNonInternalFileTargetResourceTypes
Same name in other branches
- 8.9.x core/modules/jsonapi/src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::hasNonInternalFileTargetResourceTypes()
- 10 core/modules/jsonapi/src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::hasNonInternalFileTargetResourceTypes()
- 11.x core/modules/jsonapi/src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::hasNonInternalFileTargetResourceTypes()
Determines if an array of resource types lists non-internal "file" ones.
Parameters
\Drupal\jsonapi\ResourceType\ResourceType[] $resource_types: The resource types to check.
Return value
bool TRUE if there is at least one non-internal "file" resource type in the given array; FALSE otherwise.
1 call to Routes::hasNonInternalFileTargetResourceTypes()
- Routes::getFileUploadRoutesForResourceType in core/
modules/ jsonapi/ src/ Routing/ Routes.php - Gets the file upload route collection for the given resource type.
File
-
core/
modules/ jsonapi/ src/ Routing/ Routes.php, line 450
Class
- Routes
- Defines dynamic routes.
Namespace
Drupal\jsonapi\RoutingCode
protected static function hasNonInternalFileTargetResourceTypes(array $resource_types) {
return array_reduce($resource_types, function ($carry, ResourceType $target) {
return $carry || !$target->isInternal() && $target->getEntityTypeId() === 'file';
}, FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.