protected function _skip($context)
    {
        if (!is_string($this->_on) && is_callable($this->_on)) {
            $function = $this->_on;

            return !$function($context);
        }

        $newRecord = $context['newRecord'];
        if (!empty($this->_on)) {
            if (($this->_on === 'create' && !$newRecord) || ($this->_on === 'update' && $newRecord)) {
                return true;
            }
        }

        return false;
    }
protected function _skip($context)
    {
        if (!is_string($this->_on) && is_callable($this->_on)) {
            $function = $this->_on;

            return !$function($context);
        }

        $newRecord = $context['newRecord'];
        if (!empty($this->_on)) {
            if (($this->_on === 'create' && !$newRecord) || ($this->_on === 'update' && $newRecord)) {
                return true;
            }
        }

        return false;
    }
protected function _skip ( $ context ) { if ( ! is_string ( $ this -> _on ) && is_callable ( $ this -> _on ) ) { $ function = $ this -> _on ; return ! $ function ( $ context ) ; } $ newRecord = $ context [ 'newRecord' ] ; if ( ! empty ( $ this -> _on ) ) { if ( ( $ this -> _on === 'create' && ! $ newRecord ) || ( $ this -> _on === 'update' && $ newRecord ) ) { return true ; } } return false ; }
Checks if the validation rule should be skipped

@param array $context A key value list of data that could be used as context
during validation. Recognized keys are:
- newRecord: (boolean) whether or not the data to be validated belongs to a
new record
- data: The full data that was passed to the validation process
- providers associative array with objects or class names that will
be passed as the last argument for the validation method
@return bool True if the ValidationRule should be skipped
Checks if the validation rule should be skipped