common/models/search/Option.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 = OptionModel::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
        ]);
        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'value', $this->value])
            ->andFilterWhere(['like', 'label', $this->label])
            ->andFilterWhere(['like', 'group', $this->group]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = OptionModel :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'name' , $ this -> name ] ) -> andFilterWhere ( [ 'like' , 'value' , $ this -> value ] ) -> andFilterWhere ( [ 'like' , 'label' , $ this -> label ] ) -> andFilterWhere ( [ 'like' , 'group' , $ this -> group ] ) ; 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