function SearchBlock::__construct

Same name and namespace in other branches
  1. 9 core/modules/search/src/Plugin/Block/SearchBlock.php \Drupal\search\Plugin\Block\SearchBlock::__construct()
  2. 10 core/modules/search/src/Plugin/Block/SearchBlock.php \Drupal\search\Plugin\Block\SearchBlock::__construct()
  3. 11.x core/modules/search/src/Plugin/Block/SearchBlock.php \Drupal\search\Plugin\Block\SearchBlock::__construct()

Constructs a new SearchLocalTask.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder.

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

File

core/modules/search/src/Plugin/Block/SearchBlock.php, line 54

Class

SearchBlock
Provides a 'Search form' block.

Namespace

Drupal\search\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, FormBuilderInterface $form_builder, SearchPageRepositoryInterface $search_page_repository) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->formBuilder = $form_builder;
    $this->searchPageRepository = $search_page_repository;
}

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