You are here

public function SearchBlock::__construct in Drupal 8

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()

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.

Overrides BlockPluginTrait::__construct

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;
}