示例#1
0
 /**
  * Выводим подробную информацию об устройстве вместе с данными из таблицы parameters
  * @param integer $id
  * @return mixed
  */
 public function actionView($id, $id_wp = 0)
 {
     $param_model = Parameters::findOne(['id_device' => $id]);
     $netSearch = new NetintsSearch();
     $netProvider = $netSearch->search(Yii::$app->request->queryParams, $id);
     $voipSearch = new VoipnumbersSearch();
     $voipProvider = $voipSearch->search(Yii::$app->request->queryParams, $id);
     $compSearch = new DevicesSearch();
     $compProvider = $compSearch->search(Yii::$app->request->queryParams, 0, $id);
     Yii::$app->session->set('id_wp', $id_wp);
     return $this->render('view', ['model' => $this->findModel($id), 'param_model' => $param_model, 'voipSearch' => $voipSearch, 'voipProvider' => $voipProvider, 'netSearch' => $netSearch, 'netProvider' => $netProvider, 'compSearch' => $compSearch, 'compProvider' => $compProvider]);
 }
示例#2
0
 /**
  * Lists all Netints models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new NetintsSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }