modules/admin/controllers/AbuseReportController.php
/**
     * Lists all AbuseReport models.
     * @return mixed
     */
Lists all AbuseReport models.
@return mixed
Lists all AbuseReport models . @return mixed
public function actionIndex()
    {
        $searchModel = new AbuseReportSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
        $users = ArrayHelper::map(User::find()->where(['NOT IN', 'user_type', [User::USER_TYPE_ADMIN, User::USER_TYPE_SUB_ADMIN]])->all(), 'id', function ($model) {
            return (!empty($model) && $model instanceof User && !empty($model->first_name)) ? $model->first_name . " " . $model->last_name . "(" . $model->email . ")" : "user" . " (" . $model->email . ")";
        });
        $sellers = ArrayHelper::map(User::find()->where(['NOT IN', 'user_type', [User::USER_TYPE_ADMIN, User::USER_TYPE_SUB_ADMIN]])->all(), 'id', function ($model) {
            return (!empty($model) && $model instanceof User && !empty($model->first_name)) ? $model->first_name . " " . $model->last_name . "(" . $model->email . ")" : "user" . " (" . $model->email . ")";
        });
        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
            'users' => $users,
            'sellers' => $sellers
        ]);
    }
public function actionIndex ( ) { $ searchModel = new AbuseReportSearch ( ) ; $ dataProvider = $ searchModel -> search ( Yii :: $ app -> request -> queryParams ) ; $ users = ArrayHelper :: map ( User :: find ( ) -> where ( [ 'NOT IN' , 'user_type' , [ User :: USER_TYPE_ADMIN , User :: USER_TYPE_SUB_ADMIN ] ] ) -> all ( ) , 'id' , function ( $ model ) { return ( ! empty ( $ model ) && $ model instanceof User && ! empty ( $ model -> first_name ) ) ? $ model -> first_name . " " . $ model -> last_name . " ( " . $ model -> email . " ) " : " user " . "  ( " . $ model -> email . " ) " ; } ) ; $ sellers = ArrayHelper :: map ( User :: find ( ) -> where ( [ 'NOT IN' , 'user_type' , [ User :: USER_TYPE_ADMIN , User :: USER_TYPE_SUB_ADMIN ] ] ) -> all ( ) , 'id' , function ( $ model ) { return ( ! empty ( $ model ) && $ model instanceof User && ! empty ( $ model -> first_name ) ) ? $ model -> first_name . " " . $ model -> last_name . " ( " . $ model -> email . " ) " : " user " . "  ( " . $ model -> email . " ) " ; } ) ; return $ this -> render ( 'index' , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , 'users' => $ users , 'sellers' => $ sellers ] ) ; }
Lists all AbuseReport models.
Lists all AbuseReport models .