function Block::validValue
Checks an exposed filter value array to see if it is non-empty and not All.
@todo rename this function and document it more; it doesn't test validity.
File
-
modules/
ctools_views/ src/ Plugin/ Display/ Block.php, line 945
Class
- Block
- Provides a Block display plugin.
Namespace
Drupal\ctools_views\Plugin\DisplayCode
protected function validValue($value) {
$filter = $this->valueFilter($value);
$not_all = $value != 'All';
$not_empty_or_zero = !empty($value) || is_numeric($value) && (int) $value === 0;
return $filter && $not_all && $not_empty_or_zero;
}