Esempio n. 1
0
 /**
  * Update info on presented channels
  *
  * @return int
  */
 public function actionUpdateInfo()
 {
     $searchModel = new ChannelSearch();
     $dataProvider = $searchModel->search([]);
     $result = Channel::updateChannelsInfo($dataProvider);
     return $result;
 }
Esempio n. 2
0
 public function actionUpdateChannelsInfo()
 {
     $searchModel = new ChannelSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     Channel::updateChannelsInfo($dataProvider);
     Yii::$app->session->setFlash('success', 'Info updated');
     return $this->redirect(['index']);
 }