protected static function Routes::hasNonInternalTargetResourceTypes in Drupal 10
Same name and namespace in other branches
- 8 core/modules/jsonapi/src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::hasNonInternalTargetResourceTypes()
- 9 core/modules/jsonapi/src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::hasNonInternalTargetResourceTypes()
Determines if an array of resource types has any non-internal 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 resource type in the given array; FALSE otherwise.
File
- core/
modules/ jsonapi/ src/ Routing/ Routes.php, line 434
Class
- Routes
- Defines dynamic routes.
Namespace
Drupal\jsonapi\RoutingCode
protected static function hasNonInternalTargetResourceTypes(array $resource_types) {
return array_reduce($resource_types, function ($carry, ResourceType $target) {
return $carry || !$target
->isInternal();
}, FALSE);
}