function StringFilter::acceptExposedInput
Same name and namespace in other branches
- 11.x core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::acceptExposedInput()
Determines if the input from a filter should change the generated query.
Parameters
array $input: The exposed data for this view.
Return value
bool TRUE if the input for this filter should be included in the view query. FALSE otherwise.
Overrides FilterPluginBase::acceptExposedInput
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ StringFilter.php, line 335
Class
- StringFilter
- Basic textfield filter to handle string filtering commands.
Namespace
Drupal\views\Plugin\views\filterCode
public function acceptExposedInput($input) {
$result = parent::acceptExposedInput($input);
if ($result && is_string($this->value)) {
$this->value = trim($this->value);
}
return $result;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.