modules/admin/models/MailAdressModel.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()->orderBy('group');
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if(!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'group' => $this->group,
            'email' => $this->email
        ]);
        $query->andFilterWhere(['like', 'email', $this->email])
            ->andFilterWhere(['like', 'group', $this->group]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = self :: find ( ) -> orderBy ( 'group' ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'group' => $ this -> group , 'email' => $ this -> email ] ) ; $ query -> andFilterWhere ( [ 'like' , 'email' , $ this -> email ] ) -> andFilterWhere ( [ 'like' , 'group' , $ this -> group ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params