protected static function Routes::hasNonInternalTargetResourceTypes in JSON:API 8.2
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 src/
Routing/ Routes.php - Gets a route collection for the given resource type.
File
- src/
Routing/ Routes.php, line 438
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);
}