/** * Update info on presented channels * * @return int */ public function actionUpdateInfo() { $searchModel = new ChannelSearch(); $dataProvider = $searchModel->search([]); $result = Channel::updateChannelsInfo($dataProvider); return $result; }
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']); }