Exemplo n.º 1
0
 /**
  * Check - verification step is failed or not
  *
  * @return boolean
  */
 public function isVerificationFailed()
 {
     return $this->importer->hasWarnings() || $this->importer->hasErrors();
 }
Exemplo n.º 2
0
 /**
  * Check - import process is finished
  *
  * @return boolean
  */
 protected function isImportFailed()
 {
     $repo = \XLite\Core\Database::getRepo('XLite\\Model\\TmpVar');
     $event = $repo->getEventState($this->getEventName());
     $result = $repo->getVar($this->getImportUserBreakFlagVarName());
     if (!$result) {
         $result = $event && !$repo->getVar($this->getImportCancelFlagVarName()) && \XLite\Core\Request::getInstance()->completed && (\XLite\Core\EventTask::STATE_FINISHED == $event['state'] && !$event['options']['step'] || \XLite\Core\EventTask::STATE_ABORTED == $event['state']) && (\XLite\Logic\Import\Importer::hasErrors() || \XLite\Logic\Import\Importer::hasWarnings());
     }
     return $result;
 }
Exemplo n.º 3
0
 /**
  * Cancel
  *
  * @return void
  */
 protected function doActionCancel()
 {
     if ($this->getImporter()->getOptions()->clearImportDir) {
         $this->getImporter()->deleteAllFiles();
     }
     if (\XLite\Logic\Import\Importer::hasErrors() || \XLite\Logic\Import\Importer::hasWarnings()) {
         \XLite\Logic\Import\Importer::userBreak();
     } else {
         \XLite\Logic\Import\Importer::cancel();
         \XLite\Core\TopMessage::addWarning('Import has been cancelled.');
     }
 }
Exemplo n.º 4
0
 /**
  * Check - import process has warnings or not
  *
  * @return boolean
  */
 public function hasWarnings()
 {
     return $this->importer->hasWarnings();
 }