public function Date::validateExposed in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/filter/Date.php \Drupal\views\Plugin\views\filter\Date::validateExposed()
Validate the exposed handler form
Overrides HandlerBase::validateExposed
File
- core/
modules/ views/ src/ Plugin/ views/ filter/ Date.php, line 59 - Contains \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, FormStateInterface $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
->getValue($this->options['expose']['identifier']);
if (!empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id'])) {
$operator =& $form_state
->getValue($this->options['expose']['operator_id']);
}
else {
$operator = $this->operator;
}
$this
->validateValidTime($this->options['expose']['identifier'], $form_state, $operator, $value);
}