6 declare(strict_types=1);
26 private $getQuantityInformationPerSource;
31 private $isSingleSourceMode;
48 $this->getQuantityInformationPerSource = $getQuantityInformationPerSource;
49 $this->isSingleSourceMode = $isSingleSourceMode;
50 $this->locator = $locator;
58 if ($this->isSingleSourceMode->execute() ===
false) {
59 $productId = $this->locator->getProduct()->getId();
79 private function getQuantityContainerConfig(): array
85 'componentType' =>
'text',
87 'Magento_InventoryConfigurableProductAdminUi/js/form/element/quantity-per-source',
88 'template' =>
'ui/form/field',
89 'dataScope' =>
'quantity_per_source',
90 'label' =>
__(
'Quantity Per Source'),
91 'formElement' => Form\Element\Input::NAME,
103 if ($this->isSingleSourceMode->execute() ===
false) {
106 [
'record'][
'children'][
'quantity_per_source_container'] = $this->getQuantityContainerConfig();
110 [
'record'][
'children'][
'quantity_container']);
114 =
'Magento_InventoryConfigurableProductAdminUi/js/components/dynamic-rows-configurable';
__construct(GetQuantityInformationPerSource $getQuantityInformationPerSource, IsSingleSourceModeInterface $isSingleSourceMode, LocatorInterface $locator)