/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = MovieLanguage::find()->where('status=0');
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['Id' => $this->Id, 'status' => $this->status, 'createdOn' => $this->createdOn, 'updatedOn' => $this->updatedOn, 'createdBy' => $this->createdBy, 'updatedBy' => $this->updatedBy]);
     $query->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'languageCode', $this->languageCode])->andFilterWhere(['like', 'ip', $this->ip]);
     return $dataProvider;
 }
Пример #2
0
<div class="movie-search">

    <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>

    <?php 
echo $form->field($model, 'Id');
?>

    <?php 
echo $form->field($model, 'name');
?>
    <?php 
echo $form->field($model, 'launguageId')->dropDownList(ArrayHelper::merge(['' => 'Select'], ArrayHelper::map(\common\models\MovieLanguage::find()->andWhere(['status' => 1])->All(), 'Id', 'name')));
?>
 
    <?php 
echo $form->field($model, 'state')->dropDownList(ArrayHelper::merge(['' => 'Select'], $model->StateNameArray()), ['id' => 'state']);
?>
    <?php 
// $form->field($model, 'cast')
?>

    <?php 
// $form->field($model, 'synopsis')
?>

    <?php 
//$form->field($model, 'launguageId')