public function JsonApiGenerator::__construct in OpenAPI for JSON:API 3.x
Same name and namespace in other branches
- 8.2 src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php \Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator::__construct()
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.
\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\schemata\SchemaFactory $schema_factory: The schema factory.
\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\ResourceTypeRepositoryInterface $resource_type_repository: The resource type manager.
\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.
File
- src/
Plugin/ openapi/ OpenApiGenerator/ JsonApiGenerator.php, line 122
Class
- JsonApiGenerator
- Defines an OpenApi Schema Generator for the JsonApi module.
Namespace
Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGeneratorCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, RouteProviderInterface $routing_provider, EntityFieldManagerInterface $field_manager, SerializerInterface $serializer, RequestStack $request_stack, ConfigFactoryInterface $config_factory, AuthenticationCollectorInterface $authentication_collector, SchemaFactory $schema_factory, ModuleHandlerInterface $module_handler, ParamConverterManagerInterface $param_converter_manager, ResourceTypeRepositoryInterface $resource_type_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info) {
parent::__construct($configuration, $plugin_id, $plugin_definition, $entity_type_manager, $routing_provider, $field_manager, $serializer, $request_stack, $config_factory, $authentication_collector);
$this->schemaFactory = $schema_factory;
$this->moduleHandler = $module_handler;
$this->paramConverterManager = $param_converter_manager;
$this->entityTypeBundleInfo = $entity_type_bundle_info;
// Remove the disabled resource types from the output.
$this->options['exclude'] = static::findDisabledMethods($entity_type_manager, $resource_type_repository);
}