src/DataDefinition/ModelRelationship/ParentChildCondition.php
public function parseFilter($filter, $model)
    {
        $this->guardProviderNames(null, $model);

        $applied = [
            'operation' => $filter['operation'],
        ];

        if (isset($filter['local'])) {
            $applied['property'] = $filter['local'];
        }

        if (isset($filter['remote'])) {
            $applied['value'] = $model->getProperty($filter['remote']);
        }

        if (isset($filter['remote_value'])) {
            $applied['value'] = $filter['remote_value'];
        }

        if (isset($filter['value'])) {
            $applied['value'] = $filter['value'];
        }

        if (isset($filter['children'])) {
            foreach ($filter['children'] as $child) {
                $applied['children'][] = $this->parseFilter($child, $model);
            }
        }

        return $applied;
    }
public function parseFilter($filter, $model)
    {
        $this->guardProviderNames(null, $model);

        $applied = [
            'operation' => $filter['operation'],
        ];

        if (isset($filter['local'])) {
            $applied['property'] = $filter['local'];
        }

        if (isset($filter['remote'])) {
            $applied['value'] = $model->getProperty($filter['remote']);
        }

        if (isset($filter['remote_value'])) {
            $applied['value'] = $filter['remote_value'];
        }

        if (isset($filter['value'])) {
            $applied['value'] = $filter['value'];
        }

        if (isset($filter['children'])) {
            foreach ($filter['children'] as $child) {
                $applied['children'][] = $this->parseFilter($child, $model);
            }
        }

        return $applied;
    }
public function parseFilter ( $ filter , $ model ) { $ this -> guardProviderNames ( null , $ model ) ; $ applied = [ 'operation' => $ filter [ 'operation' ] , ] ; if ( isset ( $ filter [ 'local' ] ) ) { $ applied [ 'property' ] = $ filter [ 'local' ] ; } if ( isset ( $ filter [ 'remote' ] ) ) { $ applied [ 'value' ] = $ model -> getProperty ( $ filter [ 'remote' ] ) ; } if ( isset ( $ filter [ 'remote_value' ] ) ) { $ applied [ 'value' ] = $ filter [ 'remote_value' ] ; } if ( isset ( $ filter [ 'value' ] ) ) { $ applied [ 'value' ] = $ filter [ 'value' ] ; } if ( isset ( $ filter [ 'children' ] ) ) { foreach ( $ filter [ 'children' ] as $ child ) { $ applied [ 'children' ] [ ] = $ this -> parseFilter ( $ child , $ model ) ; } } return $ applied ; }
Apply the filter values for a given model to the given rule.

@param array          $filter The filter rule to which the values shall get applied.
@param ModelInterface $model  The model to fetch the values from.

@return array
Apply the filter values for a given model to the given rule .