Entity/ExtendedFieldRepositoryTrait.php
private function getExtendedFieldFilters($args, $extendedFieldList)
    {
        $result = [];
        if (isset($args['filter'])) {
            foreach (array_keys($extendedFieldList) as $alias) {
                // @todo - Instead of strpos use regex w/ word boundry, loop below needs cleanup.
                if (
                    isset($args['filter']['string'])
                    && (
                        (
                            is_string($args['filter']['string']) && false !== strpos(
                                $args['filter']['string'],
                                $alias
                            )
                        )
                        || (
                            is_string($args['filter']['force']) && false !== strpos(
                                $args['filter']['force'],
                                $alias
                            )
                        )
                    )
                ) {
                    // field is in the filter array somewhere
                    $result[$alias] = $extendedFieldList[$alias];
                    continue;
                }
                $extendedFieldLength = strlen($alias);
                foreach (['string', 'force'] as $type) {
                    if (
                        isset($args['filter'][$type])
                        && is_array($args['filter'][$type])
                    ) {
                        foreach ($args['filter'][$type] as $filter) {
                            if (isset($filter['column'])) {
                                if (substr(
                                        $filter['column'],
                                        strlen($filter['column']) - $extendedFieldLength - 1
                                    ) == '.'.$alias) {
                                    $result[$alias] = $extendedFieldList[$alias];
                                    continue;
                                }
                            }
                        }
                    }
                }
            }
        }

        return $result;
    }
private function getExtendedFieldFilters($args, $extendedFieldList)
    {
        $result = [];
        if (isset($args['filter'])) {
            foreach (array_keys($extendedFieldList) as $alias) {
                // @todo - Instead of strpos use regex w/ word boundry, loop below needs cleanup.
                if (
                    isset($args['filter']['string'])
                    && (
                        (
                            is_string($args['filter']['string']) && false !== strpos(
                                $args['filter']['string'],
                                $alias
                            )
                        )
                        || (
                            is_string($args['filter']['force']) && false !== strpos(
                                $args['filter']['force'],
                                $alias
                            )
                        )
                    )
                ) {
                    // field is in the filter array somewhere
                    $result[$alias] = $extendedFieldList[$alias];
                    continue;
                }
                $extendedFieldLength = strlen($alias);
                foreach (['string', 'force'] as $type) {
                    if (
                        isset($args['filter'][$type])
                        && is_array($args['filter'][$type])
                    ) {
                        foreach ($args['filter'][$type] as $filter) {
                            if (isset($filter['column'])) {
                                if (substr(
                                        $filter['column'],
                                        strlen($filter['column']) - $extendedFieldLength - 1
                                    ) == '.'.$alias) {
                                    $result[$alias] = $extendedFieldList[$alias];
                                    continue;
                                }
                            }
                        }
                    }
                }
            }
        }

        return $result;
    }
private function getExtendedFieldFilters ( $ args , $ extendedFieldList ) { $ result = [ ] ; if ( isset ( $ args [ 'filter' ] ) ) { foreach ( array_keys ( $ extendedFieldList ) as $ alias ) { // @todo - Instead of strpos use regex w/ word boundry, loop below needs cleanup. if ( isset ( $ args [ 'filter' ] [ 'string' ] ) && ( ( is_string ( $ args [ 'filter' ] [ 'string' ] ) && false !== strpos ( $ args [ 'filter' ] [ 'string' ] , $ alias ) ) || ( is_string ( $ args [ 'filter' ] [ 'force' ] ) && false !== strpos ( $ args [ 'filter' ] [ 'force' ] , $ alias ) ) ) ) { // field is in the filter array somewhere $ result [ $ alias ] = $ extendedFieldList [ $ alias ] ; continue ; } $ extendedFieldLength = strlen ( $ alias ) ; foreach ( [ 'string' , 'force' ] as $ type ) { if ( isset ( $ args [ 'filter' ] [ $ type ] ) && is_array ( $ args [ 'filter' ] [ $ type ] ) ) { foreach ( $ args [ 'filter' ] [ $ type ] as $ filter ) { if ( isset ( $ filter [ 'column' ] ) ) { if ( substr ( $ filter [ 'column' ] , strlen ( $ filter [ 'column' ] ) - $ extendedFieldLength - 1 ) == '.' . $ alias ) { $ result [ $ alias ] = $ extendedFieldList [ $ alias ] ; continue ; } } } } } } } return $ result ; }
Discern search filters that are bound to extended fields.

@param string|array $args
@param array        $extendedFieldList

@return array
Discern search filters that are bound to extended fields .