public function Date::validateExposed in Views (for Drupal 7) 8.3
Validate the exposed handler form
Overrides HandlerBase::validateExposed
File
- lib/
Drupal/ views/ Plugin/ views/ filter/ Date.php, line 61 - Definition of Drupal\views\Plugin\views\filter\Date.
Class
- Date
- Filter to handle dates stored as a timestamp.
Namespace
Drupal\views\Plugin\views\filterCode
public function validateExposed(&$form, &$form_state) {
if (empty($this->options['exposed'])) {
return;
}
if (empty($this->options['expose']['required'])) {
// Who cares what the value is if it's exposed and non-required.
return;
}
$value =& $form_state['values'][$this->options['expose']['identifier']];
if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id'])) {
$operator = $form_state['values'][$this->options['expose']['operator_id']];
}
else {
$operator = $this->operator;
}
$this
->validateValidTime($this->options['expose']['identifier'], $operator, $value);
}