function Equality::value_form in Views (for Drupal 7) 8.3
Provide a simple textfield for equality
Overrides FilterPluginBase::value_form
File
- lib/
Drupal/ views/ Plugin/ views/ filter/ Equality.php, line 39 - Definition of Drupal\views\Plugin\views\filter\Equality.
Class
- Equality
- Simple filter to handle equal to / not equal to filters
Namespace
Drupal\views\Plugin\views\filterCode
function value_form(&$form, &$form_state) {
$form['value'] = array(
'#type' => 'textfield',
'#title' => t('Value'),
'#size' => 30,
'#default_value' => $this->value,
);
if (!empty($form_state['exposed'])) {
$identifier = $this->options['expose']['identifier'];
if (!isset($form_state['input'][$identifier])) {
$form_state['input'][$identifier] = $this->value;
}
}
}