function ResourceResponseValidator::__construct
Same name in this branch
- 11.x core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()
Same name and namespace in other branches
- 10 core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()
- 9 core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()
- 8.9.x core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()
- main core/modules/jsonapi/tests/modules/jsonapi_response_validator/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi_response_validator\EventSubscriber\ResourceResponseValidator::__construct()
Constructs a ResourceResponseValidator object.
Parameters
\Psr\Log\LoggerInterface $logger: The JSON:API logger channel.
\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler.
string $appRoot: The application's root file path.
File
-
core/
modules/ jsonapi/ tests/ modules/ jsonapi_response_validator/ src/ EventSubscriber/ ResourceResponseValidator.php, line 49
Class
- ResourceResponseValidator
- Response subscriber that validates a JSON:API response.
Namespace
Drupal\jsonapi_response_validator\EventSubscriberCode
public function __construct(protected LoggerInterface $logger, protected ModuleHandlerInterface $moduleHandler, protected string $appRoot) {
$this->validator = new Validator();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.