Exemplo n.º 1
0
 public function actionTask($id)
 {
     $model = DiscoveryTask::findOne($id);
     $searchChange = new Change();
     $changeProvider = $searchChange->searchPending(Yii::$app->request->get(), $id);
     return $this->render('task', ['changeProvider' => $changeProvider, 'model' => $model, 'searchChange' => $searchChange]);
 }
Exemplo n.º 2
0
 public function actionApplyAll($task)
 {
     $task = DiscoveryTask::findOne($task);
     try {
         $task->applyChanges();
     } catch (\Exception $e) {
         return false;
     }
     return true;
 }
Exemplo n.º 3
0
 public function getTasks()
 {
     return DiscoveryTask::find()->where(['sync_id' => $this->id])->orderBy(['started_at' => SORT_DESC]);
 }
Exemplo n.º 4
0
 public function getTask()
 {
     return $this->hasOne(DiscoveryTask::className(), ['id' => 'sync_event_id']);
 }