6 declare(strict_types=1);
24 private $isSourceItemManagementAllowedForProductType;
29 private $isSingleSourceMode;
39 private $getSourceItemsDataBySku;
53 $this->isSourceItemManagementAllowedForProductType = $isSourceItemManagementAllowedForProductType;
54 $this->isSingleSourceMode = $isSingleSourceMode;
55 $this->locator = $locator;
56 $this->getSourceItemsDataBySku = $getSourceItemsDataBySku;
64 $product = $this->locator->getProduct();
66 if ($this->isSingleSourceMode->execute() ===
true 67 || $this->isSourceItemManagementAllowedForProductType->execute(
$product->getTypeId()) ===
false 73 $data[
$product->getId()][
'sources'][
'assigned_sources'] = $this->getSourceItemsDataBySku->execute(
85 $product = $this->locator->getProduct();
91 'visible' => !$this->isSingleSourceMode->execute() &&
92 $this->isSourceItemManagementAllowedForProductType->execute(
$product->getTypeId()),