new JsExpression('function (attribute, value) { return $("#next").data("id") == ""; }'), ], [ ['author', 'bookTitle'], 'boolean' ], [ 'text', 'string' ] ]; } public function search(){ $query = (new Query())->select('book.id')->from('book')->join('INNER JOIN', 'author', 'book.author_id = author.id'); if ($this->author){ $query->where(['ilike', 'book.title', $this->text]); } if ($this->bookTitle){ $query->orWhere(['ilike', 'secondname', $this->text])->orWhere(['ilike', new Expression('concat(name,\' \',secondname)'), $this->text]); } return $query->andWhere(['book.status' => Book::STATUS_ACTIVE])->column(); } }