public function SearchInterface::buildSearchUrlQuery in Drupal 9
Same name and namespace in other branches
- 8 core/modules/search/src/Plugin/SearchInterface.php \Drupal\search\Plugin\SearchInterface::buildSearchUrlQuery()
Builds the URL GET query parameters array for search.
When the search form is submitted, a redirect is generated with the search input as GET query parameters. Plugins using the searchFormAlter() method to add form elements to the search form will need to override this method to gather the form input and add it to the GET query parameters.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state, with submitted form information.
Return value
array An array of GET query parameters containing all relevant form values to process the search. The 'keys' element must be present in order to trigger generation of search results, even if it is empty or unused by the search plugin.
See also
SearchInterface::searchFormAlter()
1 method overrides SearchInterface::buildSearchUrlQuery()
- SearchPluginBase::buildSearchUrlQuery in core/
modules/ search/ src/ Plugin/ SearchPluginBase.php - Builds the URL GET query parameters array for search.
File
- core/
modules/ search/ src/ Plugin/ SearchInterface.php, line 146
Class
- SearchInterface
- Defines a common interface for all SearchPlugin objects.
Namespace
Drupal\search\PluginCode
public function buildSearchUrlQuery(FormStateInterface $form_state);