public function JsonApiGenerator::__construct in OpenAPI 8
JsonApiGenerator constructor.
Parameters
array $configuration: Plugin configuration.
string $plugin_id: Unique plugin id.
array|mixed $plugin_definition: Plugin instance definition.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Routing\RouteProviderInterface $routing_provider: The routing provider.
\Drupal\Core\Entity\EntityFieldManagerInterface $field_manager: The field manager.
\Drupal\schemata\SchemaFactory $schema_factory: The schema factory.
\Symfony\Component\Serializer\SerializerInterface $serializer: The serializer.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The current request stack.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration object factory.
\Drupal\Core\Authentication\AuthenticationCollectorInterface $authentication_collector: The authentication collector.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\ParamConverter\ParamConverterManagerInterface $param_converter_manager: The parameter converter manager service.
\Drupal\jsonapi\ResourceType\ResourceTypeRepository $resource_type_repository: The resource type manager.
Overrides OpenApiGeneratorBase::__construct
File
- src/
Plugin/ openapi/ OpenApiGenerator/ JsonApiGenerator.php, line 105
Class
- JsonApiGenerator
- Defines an OpenApi Schema Generator for the JsonApi module.
Namespace
Drupal\openapi\Plugin\openapi\OpenApiGeneratorCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, RouteProviderInterface $routing_provider, EntityFieldManagerInterface $field_manager, SchemaFactory $schema_factory, SerializerInterface $serializer, RequestStack $request_stack, ConfigFactoryInterface $config_factory, AuthenticationCollectorInterface $authentication_collector, ModuleHandlerInterface $module_handler, ParamConverterManagerInterface $param_converter_manager, ResourceTypeRepository $resource_type_repository) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $routing_provider, $field_manager, $schema_factory, $serializer, $request_stack, $config_factory, $authentication_collector);
$this->moduleHandler = $module_handler;
$this->paramConverterManager = $param_converter_manager;
// Remove the disabled resource types from the output.
$this->options['exclude'] = static::findDisabledMethods($entity_type_manager, $resource_type_repository);
}