$this->params['breadcrumbs'][] = ['label' => 'Movie Theater Maps', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; if (isset($_GET['id'])) { $id = $_GET['id']; } $data = MovieTheaterMap::find()->where(['Id' => $id])->one(); if ($data) { $model->theaterId = $data->theaterId; $model->cityId = $data->cityId; } Row::begin(); Column::begin(); if ($flash = Yii::$app->session->getFlash("schedule_notification")) { Alert::begin(['options' => ['class' => 'alert-info alert-dismissable'], 'icon' => 'fa fa-info', 'closeButton' => []]); ?> <p><?php echo $flash; ?> </p> <?php Alert::end(); } Box::begin(['type' => Box::TYPE_INFO, 'header' => $this->title, 'headerIcon' => 'fa fa-gear']); echo $this->render('_form', ['model' => $model]); Box::end(); Column::end(); Row::end(); $searchModel = new MovieTheaterMapSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); echo $this->render('_index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); //echo $this->render('schedule');
/** * Lists all MovieTheaterMap models. * @return mixed */ public function actionIndex() { $searchModel = new MovieTheaterMapSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }