Model/Importer.php
public function registerQueue(
        $importType,
        $importData,
        $importMode,
        $websiteId,
        $file = false
    ) {
        try {
            if (! empty($importData)) {
                $importData = $this->serializer->serialize($importData);
            }

            if ($file) {
                $this->setImportFile($file);
            }

            if ($importData || $file) {
                $this->setImportType($importType)
                    ->setImportData($importData)
                    ->setWebsiteId($websiteId)
                    ->setImportMode($importMode);

                $this->importerResource->save($this);

                return true;
            }
        } catch (\Exception $e) {
            $this->helper->debug((string)$e, []);
        }

        if ($this->serializer->jsonError) {
            $jle = $this->serializer->jsonError;
            $format = "Json error ($jle) for Import type ($importType) / mode ($importMode) for website ($websiteId)";
            $this->helper->log($format);
        }

        return false;
    }
public function registerQueue(
        $importType,
        $importData,
        $importMode,
        $websiteId,
        $file = false
    ) {
        try {
            if (! empty($importData)) {
                $importData = $this->serializer->serialize($importData);
            }

            if ($file) {
                $this->setImportFile($file);
            }

            if ($importData || $file) {
                $this->setImportType($importType)
                    ->setImportData($importData)
                    ->setWebsiteId($websiteId)
                    ->setImportMode($importMode);

                $this->importerResource->save($this);

                return true;
            }
        } catch (\Exception $e) {
            $this->helper->debug((string)$e, []);
        }

        if ($this->serializer->jsonError) {
            $jle = $this->serializer->jsonError;
            $format = "Json error ($jle) for Import type ($importType) / mode ($importMode) for website ($websiteId)";
            $this->helper->log($format);
        }

        return false;
    }
public function registerQueue ( $ importType , $ importData , $ importMode , $ websiteId , $ file = false ) { try { if ( ! empty ( $ importData ) ) { $ importData = $ this -> serializer -> serialize ( $ importData ) ; } if ( $ file ) { $ this -> setImportFile ( $ file ) ; } if ( $ importData || $ file ) { $ this -> setImportType ( $ importType ) -> setImportData ( $ importData ) -> setWebsiteId ( $ websiteId ) -> setImportMode ( $ importMode ) ; $ this -> importerResource -> save ( $ this ) ; return true ; } } catch ( \ Exception $ e ) { $ this -> helper -> debug ( ( string ) $ e , [ ] ) ; } if ( $ this -> serializer -> jsonError ) { $ jle = $ this -> serializer -> jsonError ; $ format = "Json error ($jle) for Import type ($importType) / mode ($importMode) for website ($websiteId)" ; $ this -> helper -> log ( $ format ) ; } return false ; }
Register import in queue.

@param string $importType
@param array|string|null $importData
@param string $importMode
@param int $websiteId
@param bool $file

@return bool
Register import in queue .