public function hasAppliedValue()
    {
        $customFunction = $this->getHasAppliedValueFunction();

        if (is_callable($customFunction)) {
            $result = call_user_func($customFunction, $this);

            if (!is_bool($result)) {
                throw new FilterException('Returned value from callable function must be boolean.');
            }

            return $result;
        }

        $convertedValue = $this->getConvertedValue();

        if (is_array($convertedValue)) {
            return count($convertedValue) > 0;
        }

        if (is_string($convertedValue)) {
            return $convertedValue !== '';
        }

        // Fallback to empty() function by default.
        // If the value is int/float and it is equal to 0, it will be considered that the value has not been applied.
        // To change this behaviour, please override this method.
        return !empty($convertedValue);
    }
public function hasAppliedValue()
    {
        $customFunction = $this->getHasAppliedValueFunction();

        if (is_callable($customFunction)) {
            $result = call_user_func($customFunction, $this);

            if (!is_bool($result)) {
                throw new FilterException('Returned value from callable function must be boolean.');
            }

            return $result;
        }

        $convertedValue = $this->getConvertedValue();

        if (is_array($convertedValue)) {
            return count($convertedValue) > 0;
        }

        if (is_string($convertedValue)) {
            return $convertedValue !== '';
        }

        // Fallback to empty() function by default.
        // If the value is int/float and it is equal to 0, it will be considered that the value has not been applied.
        // To change this behaviour, please override this method.
        return !empty($convertedValue);
    }
public function hasAppliedValue ( ) { $ customFunction = $ this -> getHasAppliedValueFunction ( ) ; if ( is_callable ( $ customFunction ) ) { $ result = call_user_func ( $ customFunction , $ this ) ; if ( ! is_bool ( $ result ) ) { throw new FilterException ( 'Returned value from callable function must be boolean.' ) ; } return $ result ; } $ convertedValue = $ this -> getConvertedValue ( ) ; if ( is_array ( $ convertedValue ) ) { return count ( $ convertedValue ) > 0 ; } if ( is_string ( $ convertedValue ) ) { return $ convertedValue !== '' ; } // Fallback to empty() function by default.
 // If the value is int/float and it is equal to 0, it will be considered that the value has not been applied.
 // To change this behaviour, please override this method.
 return ! empty ( $ convertedValue ) ; }
Checks if the filter value was applied.
Note, that the converted value is used for checking.

If there is a custom function for checking if the filter value is applied,
it will be executed instead of default checking.
Note, that custom function must return boolean result of checking if the filter value has been applied.

@see AbstractFilter::getConvertedValue()
@see AbstractFilter::getHasAppliedValueFunction() for custom function for checking if the filter value is applied

@return bool

@throws FilterException On invalid custom function returned value
Checks if the filter value was applied . Note that the converted value is used for checking .