-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Msi 2182 source entity expansion with pickup location attributes.
If frontend name is empty, pickup location uses source regular name now.
- Loading branch information
Maksym Novik
committed
May 23, 2019
1 parent
f57691c
commit 3b64018
Showing
5 changed files
with
53 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
.../Magento/InventoryInStorePickup/Model/PickupLocation/Mapper/PreProcessor/FrontendName.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Magento\InventoryInStorePickup\Model\PickupLocation\Mapper\PreProcessor; | ||
|
||
use Magento\InventoryApi\Api\Data\SourceInterface; | ||
use Magento\InventoryInStorePickupApi\Model\Mapper\PreProcessorInterface; | ||
|
||
class FrontendName implements PreProcessorInterface | ||
{ | ||
|
||
/** | ||
* Process Source Field before pass it to Pickup Location | ||
* | ||
* @param SourceInterface $source | ||
* @param string $value Frontend Name Extension Attribute value | ||
* | ||
* @return string | ||
*/ | ||
public function process(SourceInterface $source, $value): string | ||
{ | ||
if (empty($value)) { | ||
$value = $source->getName(); | ||
} | ||
|
||
return $value; | ||
} | ||
} |
40 changes: 0 additions & 40 deletions
40
...gento/InventoryInStorePickup/Plugin/InventoryApi/SourceValidatorChain/SetFrontendName.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters