function Routes::hasNonInternalTargetResourceTypes
Same name in other branches
- 8.9.x core/modules/jsonapi/src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::hasNonInternalTargetResourceTypes()
- 10 core/modules/jsonapi/src/Routing/Routes.php \Drupal\jsonapi\Routing\Routes::hasNonInternalTargetResourceTypes()
- 11.x 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.
1 call to Routes::hasNonInternalTargetResourceTypes()
- Routes::getIndividualRoutesForResourceType in core/
modules/ jsonapi/ src/ Routing/ Routes.php - Gets a route collection for the given resource type.
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.