original_string: public function search($params)
      {
          $query = static::find();
  
          $dataProvider = new ActiveDataProvider(['query' => $query]);
          $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];
          $dataProvider->pagination->pageSize = Yii::$app->session->get('per-page', 20);
  
          if (!($this->load($params) && $this->validate())) {
              return $dataProvider;
          }
  
          $query
              ->andFilterWhere(['id' => $this->id])
              ->andFilterWhere(['level' => $this->level])
              ->andFilterWhere(['model' => $this->model])
              ->andFilterWhere(['user' => $this->user])
              ->andFilterWhere(['like', 'category', $this->category])
              ->andFilterWhere(['like', 'ip', $this->ip])
              ->andFilterWhere(['like', 'message', $this->message]);
  
          return $dataProvider;
      }
code: public function search($params)
      {
          $query = static::find();
  
          $dataProvider = new ActiveDataProvider(['query' => $query]);
          $dataProvider->sort->defaultOrder = ['id' => SORT_DESC];
          $dataProvider->pagination->pageSize = Yii::$app->session->get('per-page', 20);
  
          if (!($this->load($params) && $this->validate())) {
              return $dataProvider;
          }
  
          $query
              ->andFilterWhere(['id' => $this->id])
              ->andFilterWhere(['level' => $this->level])
              ->andFilterWhere(['model' => $this->model])
              ->andFilterWhere(['user' => $this->user])
              ->andFilterWhere(['like', 'category', $this->category])
              ->andFilterWhere(['like', 'ip', $this->ip])
              ->andFilterWhere(['like', 'message', $this->message]);
  
          return $dataProvider;
      }
code_tokens: public function search ( $ params ) { $ query = static :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query ] ) ; $ dataProvider -> sort -> defaultOrder = [ 'id' => SORT_DESC ] ; $ dataProvider -> pagination -> pageSize = Yii :: $ app -> session -> get ( 'per-page' , 20 ) ; if ( ! ( $ this -> load ( $ params ) && $ this -> validate ( ) ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id ] ) -> andFilterWhere ( [ 'level' => $ this -> level ] ) -> andFilterWhere ( [ 'model' => $ this -> model ] ) -> andFilterWhere ( [ 'user' => $ this -> user ] ) -> andFilterWhere ( [ 'like' , 'category' , $ this -> category ] ) -> andFilterWhere ( [ 'like' , 'ip' , $ this -> ip ] ) -> andFilterWhere ( [ 'like' , 'message' , $ this -> message ] ) ; return $ dataProvider ; }
docstring: Searches for logs.
  @param array $params Attributes
  @return ActiveDataProvider
docstring_tokens: Searches for logs .