protected function getSearchQuery($keywords)
    {
        $query = parent::getSearchQuery($keywords);

        // add hook to modify search query
        $this->extend('updateSearchQuery', $query);

        return $query;
    }
protected function getSearchQuery($keywords)
    {
        $query = parent::getSearchQuery($keywords);

        // add hook to modify search query
        $this->extend('updateSearchQuery', $query);

        return $query;
    }
protected function getSearchQuery ( $ keywords ) { $ query = parent :: getSearchQuery ( $ keywords ) ; // add hook to modify search query $ this -> extend ( 'updateSearchQuery' , $ query ) ; return $ query ; }
Builds a search query from a given search term.

Also has an extension hook which allows you to modify the parameters
of the query.

@param string $keywords

@return SearchQuery
Builds a search query from a given search term .