67 ->titleUsedDefault(
'samples_title')
69 ->titleUsedDefaultInGrid(
'link_title')
70 ->titleUsedDefaultInGrid(
'sample_title');
83 $canDisplayService = $this->locator->getProduct()->getStoreId();
84 $usedDefault = $this->locator->getProduct()->getAttributeDefaultValue($titleIndex) ===
false;
85 if ($canDisplayService) {
87 'usedDefault' => $usedDefault,
88 'disabled' => $usedDefault,
90 'template' =>
'ui/form/element/helper/service',
93 $linksTitlePath = $this->arrayManager->findPath($titleIndex, $this->meta,
null,
'children')
94 . static::META_CONFIG_PATH;
95 $this->meta = $this->arrayManager->merge($linksTitlePath, $this->meta, $useDefaultConfig);
108 $scope = (int)$this->scopeConfig->getValue(
109 \
Magento\Store\Model\Store::XML_PATH_PRICE_SCOPE,
110 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE
112 if ($scope == \
Magento\Store\Model\Store::PRICE_SCOPE_WEBSITE && $this->locator->getProduct()->getStoreId()) {
113 $linkPricePath = $this->arrayManager->findPath(
'container_link_price', $this->meta,
null,
'children');
114 $checkboxPath = $linkPricePath .
'/children/use_default_price/arguments/data/config';
115 $useDefaultConfig = [
116 'componentType' => Form\Element\Checkbox::NAME,
117 'formElement' => Form\Field::NAME,
118 'component' =>
'Magento_Downloadable/js/components/use-price-default-handler',
119 'description' =>
__(
'Use Default Value'),
120 'dataScope' =>
'use_default_price',
126 'linksPurchasedSeparately' =>
'${$.provider}:data.product.links_purchased_separately',
129 $this->meta = $this->arrayManager->set($checkboxPath, $this->meta, $useDefaultConfig);
143 if ($this->locator->getProduct()->getStoreId()) {
144 $linkTitleGroupPath = $this->arrayManager->findPath(
145 'container_' . $indexTitle,
150 $checkboxPath = $linkTitleGroupPath .
'/children/use_default_title/arguments/data/config';
151 $useDefaultConfig = [
152 'componentType' => Form\Element\Checkbox::NAME,
153 'formElement' => Form\Field::NAME,
154 'description' =>
__(
'Use Default Value'),
155 'dataScope' =>
'use_default_title',
161 'checked' =>
'${$.parentName}.' . $indexTitle .
':disabled',
164 $this->meta = $this->arrayManager->set($checkboxPath, $this->meta, $useDefaultConfig);