public function actionAjaxLinkDetail() { $this->layout = false; $id = Yii::$app->request->get("id"); $type = Yii::$app->request->get("type"); if ($type == 3) { $model = WirelessDeviceLink::findOne($id); } else { $model = DeviceLink::findOne($id); } return $this->render('link-detail', ["model" => $model]); }