You are here

public function OpenApiGeneratorBase::__construct in OpenAPI 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/openapi/OpenApiGeneratorBase.php \Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase::__construct()

OpenApiGeneratorBase 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.

Overrides PluginBase::__construct

1 call to OpenApiGeneratorBase::__construct()
JsonApiGenerator::__construct in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
JsonApiGenerator constructor.
1 method overrides OpenApiGeneratorBase::__construct()
JsonApiGenerator::__construct in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
JsonApiGenerator constructor.

File

src/Plugin/openapi/OpenApiGeneratorBase.php, line 130

Class

OpenApiGeneratorBase
Defines base class for OpenApi Generator plugins.

Namespace

Drupal\openapi\Plugin\openapi

Code

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) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->label = $this
    ->getPluginDefinition()["label"];
  $this->entityTypeManager = $entity_type_manager;
  $this->routingProvider = $routing_provider;
  $this->fieldManager = $field_manager;
  $this->schemaFactory = $schema_factory;
  $this->serializer = $serializer;
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->configFactory = $config_factory;
  $this->authenticationCollector = $authentication_collector;
  $this->options = [];
}