function SearchController::__construct

Same name and namespace in other branches
  1. 9 core/modules/search/src/Controller/SearchController.php \Drupal\search\Controller\SearchController::__construct()
  2. 8.9.x core/modules/search/src/Controller/SearchController.php \Drupal\search\Controller\SearchController::__construct()
  3. 10 core/modules/search/src/Controller/SearchController.php \Drupal\search\Controller\SearchController::__construct()

Constructs a new search controller.

Parameters

\Drupal\search\SearchPageRepositoryInterface $search_page_repository: The search page repository.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

File

core/modules/search/src/Controller/SearchController.php, line 47

Class

SearchController
Route controller for search.

Namespace

Drupal\search\Controller

Code

public function __construct(SearchPageRepositoryInterface $search_page_repository, RendererInterface $renderer) {
    $this->searchPageRepository = $search_page_repository;
    $this->logger = $this->getLogger('search');
    $this->renderer = $renderer;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.