public function isDisplayed(array $row)
    {
        if ($this->hasShowOnValues() === false) {
            return true;
        }

        $isDisplayed = false;
        foreach ($this->getShowOnValues() as $rule) {
            $value = '';
            if (isset($row[$rule['column']->getUniqueId()])) {
                $value = $row[$rule['column']->getUniqueId()];
            }

            if ($rule['value'] instanceof AbstractColumn) {
                if (isset($row[$rule['value']->getUniqueId()])) {
                    $ruleValue = $row[$rule['value']->getUniqueId()];
                } else {
                    $ruleValue = '';
                }
            } else {
                $ruleValue = $rule['value'];
            }

            $isDisplayedMatch = Filter::isApply($value, $ruleValue, $rule['comparison']);
            if ($this->getShowOnValueOperator() == 'OR' && true === $isDisplayedMatch) {
                // For OR one match is enough
                return true;
            } elseif ($this->getShowOnValueOperator() == 'AND' && false === $isDisplayedMatch) {
                return false;
            } else {
                $isDisplayed = $isDisplayedMatch;
            }
        }

        return $isDisplayed;
    }
public function isDisplayed(array $row)
    {
        if ($this->hasShowOnValues() === false) {
            return true;
        }

        $isDisplayed = false;
        foreach ($this->getShowOnValues() as $rule) {
            $value = '';
            if (isset($row[$rule['column']->getUniqueId()])) {
                $value = $row[$rule['column']->getUniqueId()];
            }

            if ($rule['value'] instanceof AbstractColumn) {
                if (isset($row[$rule['value']->getUniqueId()])) {
                    $ruleValue = $row[$rule['value']->getUniqueId()];
                } else {
                    $ruleValue = '';
                }
            } else {
                $ruleValue = $rule['value'];
            }

            $isDisplayedMatch = Filter::isApply($value, $ruleValue, $rule['comparison']);
            if ($this->getShowOnValueOperator() == 'OR' && true === $isDisplayedMatch) {
                // For OR one match is enough
                return true;
            } elseif ($this->getShowOnValueOperator() == 'AND' && false === $isDisplayedMatch) {
                return false;
            } else {
                $isDisplayed = $isDisplayedMatch;
            }
        }

        return $isDisplayed;
    }
public function isDisplayed ( array $ row ) { if ( $ this -> hasShowOnValues ( ) === false ) { return true ; } $ isDisplayed = false ; foreach ( $ this -> getShowOnValues ( ) as $ rule ) { $ value = '' ; if ( isset ( $ row [ $ rule [ 'column' ] -> getUniqueId ( ) ] ) ) { $ value = $ row [ $ rule [ 'column' ] -> getUniqueId ( ) ] ; } if ( $ rule [ 'value' ] instanceof AbstractColumn ) { if ( isset ( $ row [ $ rule [ 'value' ] -> getUniqueId ( ) ] ) ) { $ ruleValue = $ row [ $ rule [ 'value' ] -> getUniqueId ( ) ] ; } else { $ ruleValue = '' ; } } else { $ ruleValue = $ rule [ 'value' ] ; } $ isDisplayedMatch = Filter :: isApply ( $ value , $ ruleValue , $ rule [ 'comparison' ] ) ; if ( $ this -> getShowOnValueOperator ( ) == 'OR' && true === $ isDisplayedMatch ) { // For OR one match is enough return true ; } elseif ( $ this -> getShowOnValueOperator ( ) == 'AND' && false === $ isDisplayedMatch ) { return false ; } else { $ isDisplayed = $ isDisplayedMatch ; } } return $ isDisplayed ; }
Display this action on this row?

@param array $row

@return bool
Display this action on this row?