You are here

public function WebhooksService::__construct in Webhooks 8

WebhooksService constructor.

Parameters

\GuzzleHttp\Client $client: The http client.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_factory: The logger channel factory.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The logger channel factory.

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Symfony\Component\Serializer\Serializer $serializer: The serializer.

\Drupal\Component\Uuid\UuidInterface $uuid: The Uuid service.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Queue\QueueFactory $queueFactory: The queue factory object.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/WebhooksService.php, line 119

Class

WebhooksService
Class WebhookService.

Namespace

Drupal\webhooks

Code

public function __construct(Client $client, LoggerChannelFactoryInterface $logger_factory, RequestStack $request_stack, EventDispatcherInterface $event_dispatcher, EntityTypeManagerInterface $entity_type_manager, Serializer $serializer, UuidInterface $uuid, ConfigFactoryInterface $config_factory, QueueFactory $queueFactory) {
  $this->client = $client;
  $this->logger = $logger_factory
    ->get('webhooks');
  $this->requestStack = $request_stack;
  $this->eventDispatcher = $event_dispatcher;
  $this->webhookStorage = $entity_type_manager
    ->getStorage('webhook_config');
  $this->serializer = $serializer;
  $this->uuid = $uuid;
  $this->config = $config_factory
    ->get('webhooks.settings');
  $this->queue = $queueFactory
    ->get('webhooks_dispatcher', $this->config
    ->get('reliable'));
}