public function SearchApiCommands::__construct in Search API 8
Constructs a SearchApiCommands 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 Thrown if the "search_api_index" or "search_api_server" entity types' storage handlers couldn't be loaded.
\Drupal\Component\Plugin\Exception\PluginNotFoundException Thrown if the "search_api_index" or "search_api_server" entity types are unknown.
File
- src/
Commands/ SearchApiCommands.php, line 43
Class
- SearchApiCommands
- Defines Drush commands for the Search API.
Namespace
Drupal\search_api\CommandsCode
public function __construct(EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, EventDispatcherInterface $eventDispatcher) {
parent::__construct();
$this->commandHelper = new CommandHelper($entityTypeManager, $moduleHandler, $eventDispatcher, 'dt');
}