You are here

public function OpenApiGeneratorBase::__construct in OpenAPI 8.2

Same name and namespace in other branches
  1. 8 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.

\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

File

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

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, 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->serializer = $serializer;
  $this->request = $request_stack
    ->getCurrentRequest();
  $this->configFactory = $config_factory;
  $this->authenticationCollector = $authentication_collector;
  $this->options = [];
}