function SearchInterface::setSearch

Same name in other branches
  1. 9 core/modules/search/src/Plugin/SearchInterface.php \Drupal\search\Plugin\SearchInterface::setSearch()
  2. 8.9.x core/modules/search/src/Plugin/SearchInterface.php \Drupal\search\Plugin\SearchInterface::setSearch()
  3. 11.x core/modules/search/src/Plugin/SearchInterface.php \Drupal\search\Plugin\SearchInterface::setSearch()

Sets the keywords, parameters, and attributes to be used by execute().

Parameters

string $keywords: The keywords to use in a search.

array $parameters: Array of parameters as an associative array. This is expected to be the query string from the current request.

array $attributes: Array of attributes, usually from the current request object.

Return value

$this A search plugin object for chaining.

1 method overrides SearchInterface::setSearch()
SearchPluginBase::setSearch in core/modules/search/src/Plugin/SearchPluginBase.php
Sets the keywords, parameters, and attributes to be used by execute().

File

core/modules/search/src/Plugin/SearchInterface.php, line 27

Class

SearchInterface
Defines a common interface for all SearchPlugin objects.

Namespace

Drupal\search\Plugin

Code

public function setSearch($keywords, array $parameters, array $attributes);

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