protected function _getScope(EntityInterface $entity)
    {
        $scope = [];
        $config = $this->getConfig();

        // If scope are specified and data for all scope fields is not
        // provided we cannot calculate new order
        if ($config['scope']) {
            $scope = $entity->extract($config['scope']);
            if (count($scope) !== count($config['scope'])) {
                return false;
            }

            // Modify where clauses when NULL values are used
            foreach ($scope as $field => $value) {
                if (is_null($value)) {
                    $scope[$field . ' IS'] = $value;
                    unset($scope[$field]);
                }
            }
        }

        return $scope;
    }
protected function _getScope(EntityInterface $entity)
    {
        $scope = [];
        $config = $this->getConfig();

        // If scope are specified and data for all scope fields is not
        // provided we cannot calculate new order
        if ($config['scope']) {
            $scope = $entity->extract($config['scope']);
            if (count($scope) !== count($config['scope'])) {
                return false;
            }

            // Modify where clauses when NULL values are used
            foreach ($scope as $field => $value) {
                if (is_null($value)) {
                    $scope[$field . ' IS'] = $value;
                    unset($scope[$field]);
                }
            }
        }

        return $scope;
    }
protected function _getScope ( EntityInterface $ entity ) { $ scope = [ ] ; $ config = $ this -> getConfig ( ) ; // If scope are specified and data for all scope fields is not // provided we cannot calculate new order if ( $ config [ 'scope' ] ) { $ scope = $ entity -> extract ( $ config [ 'scope' ] ) ; if ( count ( $ scope ) !== count ( $ config [ 'scope' ] ) ) { return false ; } // Modify where clauses when NULL values are used foreach ( $ scope as $ field => $ value ) { if ( is_null ( $ value ) ) { $ scope [ $ field . ' IS' ] = $ value ; unset ( $ scope [ $ field ] ) ; } } } return $ scope ; }
Get scope values.

@param \Cake\Datasource\EntityInterface $entity Entity.

@return array|bool
Get scope values .