's.id', 'fields' => [ 'name' => ['translate' => true, 'field' => 's.name'], 'ico' => ['translate' => true, 'field' => 's.ico', 'spec' => 's.ico', 'fieldType' => BaseList::TYPE_STRING], 'dic' => ['translate' => true, 'field' => 's.dic', 'spec' => 's.dic', 'visible' => 'N', 'fieldType' => BaseList::TYPE_STRING], 'phone' => ['translate' => true, 'field' => 's.phone', 'spec' => 's.phone', 'visible' => 'N', 'fieldType' => BaseList::TYPE_STRING], 'address' => ['translate' => true, 'field' => 's.address', 'spec' => 's.address', 'fieldType' => BaseList::TYPE_STRING], 'email' => ['translate' => true, 'field' => 's.email', 'spec' => 's.email', 'fieldType' => BaseList::TYPE_STRING], ], ]; public function getQuery() { $qb = sqlQueryBuilder()->select('s.id, s.name')->from('suppliers', 's'); if ($value = getVal('value')) { $qb->andWhere(Search::searchFields($value, [ ['field' => 's.name', 'match' => 'both'], ['field' => 's.ico', 'match' => 'both'], ['field' => 's.email', 'match' => 'both'], ['field' => 's.phone', 'match' => 'both'], ])); } return $qb; } }