common/models/search/Module.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
@return ActiveDataProvider
Creates data provider instance with search query applied @param array $params @return ActiveDataProvider
public function search($params)
    {
        $query = ModuleModel::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
            'status' => $this->status,
            'backend_bootstrap' => $this->backend_bootstrap,
            'frontend_bootstrap' => $this->frontend_bootstrap,
            'date' => $this->date,
            'modified' => $this->modified,
        ]);
        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'title', $this->title])
            ->andFilterWhere(['like', 'description', $this->description])
            ->andFilterWhere(['like', 'config', $this->config])
            ->andFilterWhere(['like', 'directory', $this->directory]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = ModuleModel :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , 'status' => $ this -> status , 'backend_bootstrap' => $ this -> backend_bootstrap , 'frontend_bootstrap' => $ this -> frontend_bootstrap , 'date' => $ this -> date , 'modified' => $ this -> modified , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'name' , $ this -> name ] ) -> andFilterWhere ( [ 'like' , 'title' , $ this -> title ] ) -> andFilterWhere ( [ 'like' , 'description' , $ this -> description ] ) -> andFilterWhere ( [ 'like' , 'config' , $ this -> config ] ) -> andFilterWhere ( [ 'like' , 'directory' , $ this -> directory ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
 @return ActiveDataProvider
Creates data provider instance with search query applied @param array $params @return ActiveDataProvider