/**
  * 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;
 }
示例#2
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();