public function RouteEnhancer::applies in JSON:API 8
Declares if the route enhancer applies to the given route.
Parameters
\Symfony\Component\Routing\Route $route: The route to consider attaching to.
Return value
bool TRUE if the check applies to the passed route, False otherwise.
Overrides RouteEnhancerInterface::applies
File
- src/
Routing/ RouteEnhancer.php, line 20
Class
- RouteEnhancer
- Ensures the loaded entity matches the requested resource type.
Namespace
Drupal\jsonapi\RoutingCode
public function applies(Route $route) {
return (bool) Routes::getResourceTypeNameFromParameters($route
->getDefaults());
}