public function uploadSource() { $result = null; if ($sourceType = $this->getImportSource()) { $source = $this->_helper->getSourceModelByType($sourceType); $source->setData($this->getData()); try { $result = $source->uploadSource(); } catch (\Exception $e) { throw new \Magento\Framework\Exception\LocalizedException(__($e->getMessage())); } } if ($result) { return $result; } return parent::uploadSource(); }
/** * {@inheritdoc} */ public function uploadSource() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'uploadSource'); if (!$pluginInfo) { return parent::uploadSource(); } else { return $this->___callPlugins('uploadSource', func_get_args(), $pluginInfo); } }