backend/models/search/QueuedEventsSearch.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()
            ->alias("t1")
            ->select("t1.*, t2.user_email")
            ->leftJoin('{{%users}} as t2', 't2.user_id = t1.user_id');
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort'=> [
                'defaultOrder' => ['job_created'=>SORT_DESC],
                'attributes' => [
                    'job_id',
                    'queue_id',
                    '_user_email' => [
                        'asc' => ['t2.user_email' => SORT_ASC],
                        'desc' => ['t2.user_email' => SORT_DESC],
                    ],
                    'job_status',
                    'job_type',
                    'job_created',
                    'job_started',
                    'job_finished',
                ]
            ],
            'pagination' => [
                'pageSize' => 100,
            ],
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'node_id' => $this->node_id,
            'queue_id' => $this->queue_id,
            'user_id' => $this->user_id,
            'event_uuid' => $this->event_uuid,
            'job_id' => $this->job_id,
            'job_type' => $this->job_type,
            'job_status' => $this->job_status,
        ]);
        $query->andFilterWhere(['like', 't2.user_email', $this->_user_email]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = self :: find ( ) -> alias ( " t1 " ) -> select ( " t1.*, t2.user_email " ) -> leftJoin ( '{{%users}} as t2' , 't2.user_id = t1.user_id' ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , 'sort' => [ 'defaultOrder' => [ 'job_created' => SORT_DESC ] , 'attributes' => [ 'job_id' , 'queue_id' , '_user_email' => [ 'asc' => [ 't2.user_email' => SORT_ASC ] , 'desc' => [ 't2.user_email' => SORT_DESC ] , ] , 'job_status' , 'job_type' , 'job_created' , 'job_started' , 'job_finished' , ] ] , 'pagination' => [ 'pageSize' => 100 , ] , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'node_id' => $ this -> node_id , 'queue_id' => $ this -> queue_id , 'user_id' => $ this -> user_id , 'event_uuid' => $ this -> event_uuid , 'job_id' => $ this -> job_id , 'job_type' => $ this -> job_type , 'job_status' => $ this -> job_status , ] ) ; $ query -> andFilterWhere ( [ 'like' , 't2.user_email' , $ this -> _user_email ] ) ; 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 //'job_created' => $this->job_created, //'job_started' => $this->job_started, //'job_finished' => $this->job_finished,