Ejemplo n.º 1
0
 /**
  * Finds the MovieTheaterMap model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return MovieTheaterMap the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = MovieTheaterMap::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = MovieTheaterMap::find()->where('status=0');
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['Id' => $this->Id, 'movieId' => $this->movieId, 'theaterId' => $this->theaterId, 'launguageId' => $this->launguageId, 'cityId' => $this->cityId, 'startDate' => $this->startDate, 'endDate' => $this->endDate, 'lastEndDate' => $this->lastEndDate, 'createdOn' => $this->createdOn, 'updatedOn' => $this->updatedOn, 'createdBy' => $this->createdBy, 'updatedBy' => $this->updatedBy, 'status' => $this->status]);
     $query->andFilterWhere(['like', 'showTime', $this->showTime])->andFilterWhere(['like', 'nextWeekShowTime', $this->nextWeekShowTime])->andFilterWhere(['like', 'ip', $this->ip]);
     return $dataProvider;
 }
Ejemplo n.º 3
0
use yii\helpers\Html;
use yii\adminUi\widget\Box;
use yii\adminUi\widget\Row;
use yii\adminUi\widget\Column;
use common\models\MovieTheaterMapSearch;
use common\models\MovieTheaterMap;
use yii\adminUi\widget\Alert;
/* @var $this yii\web\View */
/* @var $model common\models\MovieTheaterMap */
$this->title = 'Create Movie Theater Map';
$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();
Ejemplo n.º 4
0
 public function getMovieTheaterMap()
 {
     return $this->hasMany(MovieTheaterMap::className(), ['launguageId' => 'Id']);
 }