/** * Creates an instance of the import resource needed to import $importType * * Will also inject the dependencies needed and return the created object * * @param $importType string The import resource to create * @return Shopware_Components_Migration_Import_Resource_Abstract */ public function initImport($importType) { $offset = empty($this->Request()->offset) ? 0 : (int) $this->Request()->offset; $name = $this->imports[$importType]; /** @var $progress Shopware_Components_Migration_Import_Progress */ $progress = new Shopware_Components_Migration_Import_Progress(); $progress->setOffset($offset); $import = Shopware_Components_Migration::resourceFactory($name, $progress, $this->Source(), $this->Target(), $this->request); $import->setInternalName($importType); $import->setMaxExecution($this->max_execution); return $import; }