You are here

public function TaskManager::__construct in Search API 8

Constructs a TaskManager object.

Parameters

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

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

\Drupal\Core\StringTranslation\TranslationInterface $translation: The string translation service.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

File

src/Task/TaskManager.php, line 81

Class

TaskManager
Provides a service for managing pending tasks.

Namespace

Drupal\search_api\Task

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, EventDispatcherInterface $event_dispatcher, TranslationInterface $translation, MessengerInterface $messenger) {
  $this->entityTypeManager = $entity_type_manager;
  $this->eventDispatcher = $event_dispatcher;
  $this
    ->setStringTranslation($translation);
  $this->messenger = $messenger;
}