concrete/src/Page/PageList.php
public function filterByKeywords($keywords)
    {
        $expressions = [
            $this->query->expr()->like('psi.cName', ':keywords'),
            $this->query->expr()->like('psi.cDescription', ':keywords'),
            $this->query->expr()->like('psi.content', ':keywords'),
        ];

        $keys = \CollectionAttributeKey::getSearchableIndexedList();
        foreach ($keys as $ak) {
            $cnt = $ak->getController();
            $expressions[] = $cnt->searchKeywords($keywords, $this->query);
        }
        $expr = $this->query->expr();
        $this->query->andWhere(call_user_func_array([$expr, 'orX'], $expressions));
        $this->query->setParameter('keywords', '%' . $keywords . '%');
    }
public function filterByKeywords($keywords)
    {
        $expressions = [
            $this->query->expr()->like('psi.cName', ':keywords'),
            $this->query->expr()->like('psi.cDescription', ':keywords'),
            $this->query->expr()->like('psi.content', ':keywords'),
        ];

        $keys = \CollectionAttributeKey::getSearchableIndexedList();
        foreach ($keys as $ak) {
            $cnt = $ak->getController();
            $expressions[] = $cnt->searchKeywords($keywords, $this->query);
        }
        $expr = $this->query->expr();
        $this->query->andWhere(call_user_func_array([$expr, 'orX'], $expressions));
        $this->query->setParameter('keywords', '%' . $keywords . '%');
    }
public function filterByKeywords ( $ keywords ) { $ expressions = [ $ this -> query -> expr ( ) -> like ( 'psi.cName' , ':keywords' ) , $ this -> query -> expr ( ) -> like ( 'psi.cDescription' , ':keywords' ) , $ this -> query -> expr ( ) -> like ( 'psi.content' , ':keywords' ) , ] ; $ keys = \ CollectionAttributeKey :: getSearchableIndexedList ( ) ; foreach ( $ keys as $ ak ) { $ cnt = $ ak -> getController ( ) ; $ expressions [ ] = $ cnt -> searchKeywords ( $ keywords , $ this -> query ) ; } $ expr = $ this -> query -> expr ( ) ; $ this -> query -> andWhere ( call_user_func_array ( [ $ expr , 'orX' ] , $ expressions ) ) ; $ this -> query -> setParameter ( 'keywords' , '%' . $ keywords . '%' ) ; }
Filters keyword fields by keywords (including name, description, content, and attributes.

@param $keywords
Filters keyword fields by keywords ( including name description content and attributes .