예제 #1
0
 public function actionIndex()
 {
     $this->layout = '/adminka-admin';
     $video_categoria = VideoCategoria::find()->all();
     $authors = Author::find()->all();
     return $this->render('index', ['video_categoria' => $video_categoria, 'authors' => $authors]);
 }
예제 #2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = VideoCategoria::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if ($this->load($params) && !$this->validate()) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id]);
     $query->andFilterWhere(['like', 'name', $this->name]);
     return $dataProvider;
 }
예제 #3
0
 public static function getModel()
 {
     return VideoCategoria::find()->all();
 }