/** * Display grids with all the Notifications + Administrator Notifications */ public function actionAdminnotifications() { $myId = \Yii::$app->user->id; $apiNotifications = new NotifAPIHelper(); $fUAModel = $apiNotifications->getAllAPIChangesForWhatIFollow($myId); $userNotifications = new NotifUserHelper(); $fUUModel = $userNotifications->getAllUserChangesForWhatIFollow($myId); // Find the APIs that are under review $apis = Apis::find()->where(['cbs' => 0, 'status' => 'Under Review']); $proposedAPIsModel = new ActiveDataProvider(['query' => $apis]); // Find the CBS that are still pending review $cbs = Apis::find()->where(['cbs' => 1, 'status' => 'Under Review']); $proposedCBSModel = new ActiveDataProvider(['query' => $cbs]); return $this->render('adminnotifications', ['fUAModel' => $fUAModel, 'fUUModel' => $fUUModel, 'proposedAPIsModel' => $proposedAPIsModel, 'proposedCBSModel' => $proposedCBSModel]); }