public function ResourceEnhancer::__construct in JSON:API Resources 8
ResourceEnhancer constructor.
Parameters
\Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver: A class resolver to load the appropriate JSON:API resource for the matched route.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The route matched by the request.
File
- src/
Unstable/ Routing/ Enhancer/ ResourceEnhancer.php, line 39
Class
- ResourceEnhancer
- Route enhancer for JSON:API Resource routes.
Namespace
Drupal\jsonapi_resources\Unstable\Routing\EnhancerCode
public function __construct(ClassResolverInterface $class_resolver, RouteMatchInterface $route_match) {
$this->classResolver = $class_resolver;
$this->routeMatch = $route_match;
}