Exemple #1
0
 /**
  * Returns the number of currently pending approvals
  * 
  * @return int currently pending approvals
  */
 protected function countPendingApprovals()
 {
     $searchModel = new MembershipSearch();
     $searchModel->space_id = $this->space->id;
     $searchModel->status = Membership::STATUS_APPLICANT;
     return $searchModel->search([])->getCount();
 }
 /**
  * Members Administration Action
  */
 public function actionPendingApprovals()
 {
     $space = $this->getSpace();
     $searchModel = new MembershipSearch();
     $searchModel->space_id = $space->id;
     $searchModel->status = Membership::STATUS_APPLICANT;
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('pending-approvals', array('dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'space' => $space));
 }