function Block::valueFilter

Filter a potential array of values to see if any are non-0 string lengths.

1 call to Block::valueFilter()
Block::validValue in modules/ctools_views/src/Plugin/Display/Block.php
Checks an exposed filter value array to see if it is non-empty and not All.

File

modules/ctools_views/src/Plugin/Display/Block.php, line 955

Class

Block
Provides a Block display plugin.

Namespace

Drupal\ctools_views\Plugin\Display

Code

protected function valueFilter($value) {
    if (is_array($value)) {
        foreach ($value as $element) {
            // If any element returns non-0, we know all we need to.
            if ($test = $this->valueFilter($element)) {
                return $test;
            }
        }
    }
    else {
        return strlen($value);
    }
}