function SearchBlock::__construct
Same name in other branches
- 8.9.x core/modules/search/src/Plugin/Block/SearchBlock.php \Drupal\search\Plugin\Block\SearchBlock::__construct()
- 10 core/modules/search/src/Plugin/Block/SearchBlock.php \Drupal\search\Plugin\Block\SearchBlock::__construct()
- 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.
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\BlockCode
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.