|
7 | 7 |
|
8 | 8 | use Magento\Framework\App\ObjectManager; |
9 | 9 | use Magento\Framework\App\ResourceConnection; |
| 10 | +use Magento\Framework\Exception\LocalizedException; |
10 | 11 | use Magento\Framework\Serialize\Serializer\Json; |
11 | 12 | use Magento\ImportExport\Model\Import\AbstractSource; |
12 | 13 | use Magento\ImportExport\Model\Import as ImportExport; |
@@ -310,7 +311,7 @@ public function __construct( |
310 | 311 | protected function _getSource() |
311 | 312 | { |
312 | 313 | if (!$this->_source) { |
313 | | - throw new \Magento\Framework\Exception\LocalizedException(__('Please specify a source.')); |
| 314 | + throw new LocalizedException(__('Please specify a source.')); |
314 | 315 | } |
315 | 316 | return $this->_source; |
316 | 317 | } |
@@ -548,11 +549,11 @@ public function getBehavior() |
548 | 549 | if (!isset( |
549 | 550 | $this->_parameters['behavior'] |
550 | 551 | ) || |
551 | | - $this->_parameters['behavior'] != \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND && |
552 | | - $this->_parameters['behavior'] != \Magento\ImportExport\Model\Import::BEHAVIOR_REPLACE && |
553 | | - $this->_parameters['behavior'] != \Magento\ImportExport\Model\Import::BEHAVIOR_DELETE |
| 552 | + $this->_parameters['behavior'] != ImportExport::BEHAVIOR_APPEND && |
| 553 | + $this->_parameters['behavior'] != ImportExport::BEHAVIOR_REPLACE && |
| 554 | + $this->_parameters['behavior'] != ImportExport::BEHAVIOR_DELETE |
554 | 555 | ) { |
555 | | - return \Magento\ImportExport\Model\Import::getDefaultBehavior(); |
| 556 | + return ImportExport::getDefaultBehavior(); |
556 | 557 | } |
557 | 558 | return $this->_parameters['behavior']; |
558 | 559 | } |
@@ -604,7 +605,7 @@ public function getProcessedRowsCount() |
604 | 605 | public function getSource() |
605 | 606 | { |
606 | 607 | if (!$this->_source) { |
607 | | - throw new \Magento\Framework\Exception\LocalizedException(__('The source is not set.')); |
| 608 | + throw new LocalizedException(__('The source is not set.')); |
608 | 609 | } |
609 | 610 | return $this->_source; |
610 | 611 | } |
@@ -879,7 +880,7 @@ public function getValidColumnNames() |
879 | 880 | protected function getMetadataPool() |
880 | 881 | { |
881 | 882 | if (!$this->metadataPool) { |
882 | | - $this->metadataPool = \Magento\Framework\App\ObjectManager::getInstance() |
| 883 | + $this->metadataPool = ObjectManager::getInstance() |
883 | 884 | ->get(\Magento\Framework\EntityManager\MetadataPool::class); |
884 | 885 | } |
885 | 886 | return $this->metadataPool; |
|
0 commit comments