This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
579 additions
and
340 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
"name": "Agata", | ||
"email": "[email protected]" | ||
}], | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"keywords": [ | ||
"magento", | ||
"magento2", | ||
|
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
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
54 changes: 54 additions & 0 deletions
54
src/module-vsbridge-indexer-catalog/Model/Attribute/LoadOptionById.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,54 @@ | ||
<?php | ||
|
||
declare(strict_types = 1); | ||
|
||
/** | ||
* @package Divante\VsbridgeIndexerCatalog | ||
* @author Agata Firlejczyk <[email protected]> | ||
* @copyright 2019 Divante Sp. z o.o. | ||
* @license See LICENSE_DIVANTE.txt for license details. | ||
*/ | ||
|
||
namespace Divante\VsbridgeIndexerCatalog\Model\Attribute; | ||
|
||
/** | ||
* Class LoadOptionById | ||
*/ | ||
class LoadOptionById | ||
{ | ||
|
||
/** | ||
* @var LoadOptions | ||
*/ | ||
private $loadOptions; | ||
|
||
/** | ||
* LoadOptionById constructor. | ||
* | ||
* @param LoadOptions $loadOptions | ||
*/ | ||
public function __construct(LoadOptions $loadOptions) | ||
{ | ||
$this->loadOptions = $loadOptions; | ||
} | ||
|
||
/** | ||
* @param string $attributeCode | ||
* @param int $optionId | ||
* @param int $storeId | ||
* | ||
* @return array | ||
*/ | ||
public function execute(string $attributeCode, int $optionId, int $storeId): array | ||
{ | ||
$options = $this->loadOptions->execute($attributeCode, $storeId); | ||
|
||
foreach ($options as $option) { | ||
if ($optionId === (int)$option['value']) { | ||
return $option; | ||
} | ||
} | ||
|
||
return []; | ||
} | ||
} |
79 changes: 0 additions & 79 deletions
79
src/module-vsbridge-indexer-catalog/Model/Attribute/LoadOptionLabelById.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.