You are here

public function SearchApiSolrCommands::__construct in Search API Solr 8.3

Same name and namespace in other branches
  1. 8.2 src/Commands/SearchApiSolrCommands.php \Drupal\search_api_solr\Commands\SearchApiSolrCommands::__construct()
  2. 4.x src/Commands/SearchApiSolrCommands.php \Drupal\search_api_solr\Commands\SearchApiSolrCommands::__construct()

Constructs a SearchApiSolrCommands object.

Parameters

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

\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler: The module handler.

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

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Commands/SearchApiSolrCommands.php, line 45

Class

SearchApiSolrCommands
Defines Drush commands for the Search API Solr.

Namespace

Drupal\search_api_solr\Commands

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, EventDispatcherInterface $eventDispatcher) {
  parent::__construct();
  $this->commandHelper = new SolrCommandHelper($entityTypeManager, $moduleHandler, $eventDispatcher, 'dt');
}