示例#1
0
 /**
  * Execute the queue job.
  *
  * @return void
  */
 public function fire($job, $data)
 {
     $this->job = $job;
     $this->download = $this->formsRepository->getDownload($data['id']);
     if ($this->download) {
         $this->run();
     }
     $this->job->delete();
 }
 /**
  * Get Progress as Json 
  * 
  * @param int $form_id 
  * 
  * @return           
  */
 public function getProgress($form_id)
 {
     Coanda::checkAccess('webforms', 'view');
     try {
         $form = $this->webFormsRepository->getForm($form_id);
         return $form->download();
     } catch (WebFormNotFoundException $exception) {
         $returnData = array('status' => 'error', 'message' => 'Web Form or Download not found!');
         return \Response::json($returnData, 404);
     }
 }
 private function loopSubmissions($offset, $limit)
 {
     $submissions = $this->formsRepository->getSubmissions($this->form->id, $offset, $limit, $this->date_range_from, $this->date_range_to, false);
     if ($submissions->count() == 0) {
         return true;
     }
     foreach ($submissions as $submission) {
         $row = [];
         foreach ($submission->fields as $field) {
             $row[$field->identifier . '-' . $field->field_id] = $field->display_export;
         }
         $row['created_at'] = $submission->created_at;
         $this->addSubmissionRow($row);
     }
     return false;
 }