src/Charcoal/Ui/ConditionalizableTrait.php
final protected function parseConditionalLogic($condition)
    {
        if ($condition === null) {
            return null;
        }

        if (is_bool($condition)) {
            return $condition;
        }

        $not = false;
        if (is_string($condition)) {
            $not = ($condition[0] === '!');
            if ($not) {
                $condition = ltrim($condition, '!');
            }
        }

        $result = $this->resolveConditionalLogic($condition);

        return (($not === true) ? !$result : $result);
    }
final protected function parseConditionalLogic($condition)
    {
        if ($condition === null) {
            return null;
        }

        if (is_bool($condition)) {
            return $condition;
        }

        $not = false;
        if (is_string($condition)) {
            $not = ($condition[0] === '!');
            if ($not) {
                $condition = ltrim($condition, '!');
            }
        }

        $result = $this->resolveConditionalLogic($condition);

        return (($not === true) ? !$result : $result);
    }
final protected function parseConditionalLogic ( $ condition ) { if ( $ condition === null ) { return null ; } if ( is_bool ( $ condition ) ) { return $ condition ; } $ not = false ; if ( is_string ( $ condition ) ) { $ not = ( $ condition [ 0 ] === '!' ) ; if ( $ not ) { $ condition = ltrim ( $ condition , '!' ) ; } } $ result = $ this -> resolveConditionalLogic ( $ condition ) ; return ( ( $ not === true ) ? ! $ result : $ result ) ; }
Resolve the conditional logic.

@param  mixed $condition The condition.
@return boolean|null
Resolve the conditional logic .