src/ORM/DataObject.php
public function defaultSearchFilters()
    {
        $filters = array();

        foreach ($this->searchableFields() as $name => $spec) {
            if (empty($spec['filter'])) {
                /** @skipUpgrade */
                $filters[$name] = 'PartialMatchFilter';
            } elseif ($spec['filter'] instanceof SearchFilter) {
                $filters[$name] = $spec['filter'];
            } else {
                $filters[$name] = Injector::inst()->create($spec['filter'], $name);
            }
        }

        return $filters;
    }
public function defaultSearchFilters()
    {
        $filters = array();

        foreach ($this->searchableFields() as $name => $spec) {
            if (empty($spec['filter'])) {
                /** @skipUpgrade */
                $filters[$name] = 'PartialMatchFilter';
            } elseif ($spec['filter'] instanceof SearchFilter) {
                $filters[$name] = $spec['filter'];
            } else {
                $filters[$name] = Injector::inst()->create($spec['filter'], $name);
            }
        }

        return $filters;
    }
public function defaultSearchFilters ( ) { $ filters = array ( ) ; foreach ( $ this -> searchableFields ( ) as $ name => $ spec ) { if ( empty ( $ spec [ 'filter' ] ) ) { /** @skipUpgrade */ $ filters [ $ name ] = 'PartialMatchFilter' ; } elseif ( $ spec [ 'filter' ] instanceof SearchFilter ) { $ filters [ $ name ] = $ spec [ 'filter' ] ; } else { $ filters [ $ name ] = Injector :: inst ( ) -> create ( $ spec [ 'filter' ] , $ name ) ; } } return $ filters ; }
Defines a default list of filters for the search context.

If a filter class mapping is defined on the data object,
it is constructed here. Otherwise, the default filter specified in
{@link DBField} is used.

@todo error handling/type checking for valid FormField and SearchFilter subclasses?

@return array
Defines a default list of filters for the search context .