Example #1
0
 /**
  * Lists all Estate models.
  *
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new EstateSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $user = User::findOne(Yii::$app->user->id);
     $isManager = LinkManager::isAccessible($user->id);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'user' => $user, 'isManager' => $isManager]);
 }
Example #2
0
 /**
  * Lists all Communal's models.
  *
  * @return mixed
  */
 public function actionIndex()
 {
     $estateCount = count(Estate::findAll(['user_id' => Yii::$app->user->id]));
     if ($estateCount < 1) {
         return $this->redirect(['/estate/manage/create']);
     }
     $searchModel = new EstateSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Example #3
0
 /**
  * Shows index page of Communal Module
  *
  * @return string
  */
 public function actionIndex()
 {
     $searchModel = new EstateSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }