You are here

public function SearchApiSortsManager::__construct in Search API sorts 8

SearchApiSortsManager constructor.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack, containing the current request.

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

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

\Drupal\search_api\Display\DisplayPluginManagerInterface $searchApiDisplayManager: The search api display manager.

File

src/SearchApiSortsManager.php, line 58

Class

SearchApiSortsManager
Manages search api sorts.

Namespace

Drupal\search_api_sorts

Code

public function __construct(RequestStack $request_stack, EntityTypeManagerInterface $entity_type_manager, ModuleHandlerInterface $module_handler, DisplayPluginManagerInterface $searchApiDisplayManager) {
  $this->currentRequest = $request_stack
    ->getCurrentRequest();
  $this->searchApiSortsFieldStorage = $entity_type_manager
    ->getStorage('search_api_sorts_field');
  $this->moduleHandler = $module_handler;
  $this->searchApiDisplayManager = $searchApiDisplayManager;
}