Example #1
0
 /**
  * Displays a single Structure model.
  * @param integer $id
  * @return mixed
  */
 public function actionAllstaff()
 {
     $model = $this->findStructure(Yii::$app->settings->get('staff.tree'));
     $staff = new ActiveDataProvider(['query' => Staff::find()->where(['orgid' => $model->id])->orderBy(['ind' => 'ASC'])]);
     return $this->render('structure', ['staff' => $staff, 'model' => $model]);
 }
Example #2
0
 /**
  * Displays a single Structure model.
  * @param integer $id
  * @return mixed
  */
 public function actionView($id)
 {
     $model = $this->findModel($id);
     $staff = new ActiveDataProvider(['query' => Staff::find()->where(['structid' => $model->id])->orderBy(['ind' => 'ASC'])]);
     return $this->render('view', ['staff' => $staff, 'model' => $model]);
 }
Example #3
0
 /**
  * Lists all Staff models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Staff::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }