From 37ab6c309f32d3785a64776a5d79fd2a3cab811d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20D=C3=B6llerer?= Date: Wed, 19 Aug 2020 15:01:18 +0200 Subject: [PATCH 1/2] PAC-129 - Refactor override images option --- src/Subjects/BunchSubject.php | 4 ++-- src/Utils/ConfigurationKeys.php | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Subjects/BunchSubject.php b/src/Subjects/BunchSubject.php index 9d2f838..52d259d 100644 --- a/src/Subjects/BunchSubject.php +++ b/src/Subjects/BunchSubject.php @@ -123,8 +123,8 @@ public function setUp($serial) // initialize the flag whether to override images or not // @todo https://github.com/techdivision/import/issues/181 // Create new constant ConfigurationKeys::OVERRIDE_IMAGES for future release - if ($this->getConfiguration()->hasParam('override-images')) { - $this->setOverrideImages($this->getConfiguration()->getParam('override-images')); + if ($this->getConfiguration()->hasParam(ConfigurationKeys::OVERRIDE_IMAGES)) { + $this->setOverrideImages($this->getConfiguration()->getParam(ConfigurationKeys::OVERRIDE_IMAGES)); } // initialize media directory => can be absolute or relative diff --git a/src/Utils/ConfigurationKeys.php b/src/Utils/ConfigurationKeys.php index 2f658b1..66e28ca 100644 --- a/src/Utils/ConfigurationKeys.php +++ b/src/Utils/ConfigurationKeys.php @@ -52,4 +52,11 @@ class ConfigurationKeys extends \TechDivision\Import\Utils\ConfigurationKeys * @var string */ const COPY_IMAGES = 'copy-images'; + + /** + * Name for the column 'override-images'. + * + * @var string + */ + const OVERRIDE_IMAGES = 'override-images'; } From bc9159e8db9f2401582585ce1c6e51f5ed7ba52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20D=C3=B6llerer?= Date: Wed, 19 Aug 2020 15:07:33 +0200 Subject: [PATCH 2/2] PAC-129 - Remove TODO annotation --- src/Subjects/BunchSubject.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Subjects/BunchSubject.php b/src/Subjects/BunchSubject.php index 52d259d..932c2cd 100644 --- a/src/Subjects/BunchSubject.php +++ b/src/Subjects/BunchSubject.php @@ -121,8 +121,6 @@ public function setUp($serial) } // initialize the flag whether to override images or not - // @todo https://github.com/techdivision/import/issues/181 - // Create new constant ConfigurationKeys::OVERRIDE_IMAGES for future release if ($this->getConfiguration()->hasParam(ConfigurationKeys::OVERRIDE_IMAGES)) { $this->setOverrideImages($this->getConfiguration()->getParam(ConfigurationKeys::OVERRIDE_IMAGES)); }