selfhosted/models/search/SelfHostUsersSearch.php
/**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
Creates data provider instance with search query applied
@param array $params


Creates data provider instance with search query applied @param array $params
public function search($params)
    {
        $query = self::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'shu_id' => $this->shu_id,
            'shu_created' => $this->shu_created,
            'shu_updated' => $this->shu_updated,
            'shu_status' => $this->shu_status,
            'shu_role' => $this->shu_role,
        ]);
        $query->andFilterWhere(['ilike', 'shu_name', $this->shu_name])
            ->andFilterWhere(['ilike', 'shu_email', $this->shu_email])
            ->andFilterWhere(['ilike', 'auth_key', $this->auth_key])
            ->andFilterWhere(['ilike', 'password_hash', $this->password_hash])
            ->andFilterWhere(['ilike', 'password_reset_token', $this->password_reset_token]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = self :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'shu_id' => $ this -> shu_id , 'shu_created' => $ this -> shu_created , 'shu_updated' => $ this -> shu_updated , 'shu_status' => $ this -> shu_status , 'shu_role' => $ this -> shu_role , ] ) ; $ query -> andFilterWhere ( [ 'ilike' , 'shu_name' , $ this -> shu_name ] ) -> andFilterWhere ( [ 'ilike' , 'shu_email' , $ this -> shu_email ] ) -> andFilterWhere ( [ 'ilike' , 'auth_key' , $ this -> auth_key ] ) -> andFilterWhere ( [ 'ilike' , 'password_hash' , $ this -> password_hash ] ) -> andFilterWhere ( [ 'ilike' , 'password_reset_token' , $ this -> password_reset_token ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params
// add conditions that should always apply here // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); // grid filtering conditions