private static function fixFilterFieldPath(?Filter $filter): ? Filter
    {
        if (is_null($filter)) {
            return $filter;
        }

        $filterAsArray = $filter->toArray();
        $filterAsArray['field'] = Item::getPathByField($filterAsArray['field']);

        return Filter::createFromArray($filterAsArray);
    }
private static function fixFilterFieldPath(?Filter $filter): ? Filter
    {
        if (is_null($filter)) {
            return $filter;
        }

        $filterAsArray = $filter->toArray();
        $filterAsArray['field'] = Item::getPathByField($filterAsArray['field']);

        return Filter::createFromArray($filterAsArray);
    }
private static function fixFilterFieldPath ( ? Filter $ filter ) : ? Filter { if ( is_null ( $ filter ) ) { return $ filter ; } $ filterAsArray = $ filter -> toArray ( ) ; $ filterAsArray [ 'field' ] = Item :: getPathByField ( $ filterAsArray [ 'field' ] ) ; return Filter :: createFromArray ( $ filterAsArray ) ; }
Fix filter path.

@param Filter|null $filter

@return Filter
Fix filter path .