Skip to content

Commit 26794cb

Browse files
authored
Merge pull request #4527 from magento-obsessive-owls/MC-15978
[owls] MC-15978: Catalog Product Attribute Set Name
2 parents 58d3190 + 874d137 commit 26794cb

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AttributeSet.php

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,20 @@ public function getOptions()
7878
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\Collection::SORT_ORDER_ASC
7979
);
8080

81-
return $collection->getData();
81+
$collectionData = $collection->getData() ?? [];
82+
83+
array_walk(
84+
$collectionData,
85+
function (&$attribute) {
86+
$attribute['__disableTmpl'] = true;
87+
}
88+
);
89+
90+
return $collectionData;
8291
}
8392

8493
/**
85-
* {@inheritdoc}
94+
* @inheritdoc
8695
* @since 101.0.0
8796
*/
8897
public function modifyMeta(array $meta)
@@ -116,17 +125,20 @@ public function modifyMeta(array $meta)
116125
}
117126

118127
/**
119-
* {@inheritdoc}
128+
* @inheritdoc
120129
* @since 101.0.0
121130
*/
122131
public function modifyData(array $data)
123132
{
124-
return array_replace_recursive($data, [
125-
$this->locator->getProduct()->getId() => [
126-
self::DATA_SOURCE_DEFAULT => [
127-
'attribute_set_id' => $this->locator->getProduct()->getAttributeSetId()
128-
],
133+
return array_replace_recursive(
134+
$data,
135+
[
136+
$this->locator->getProduct()->getId() => [
137+
self::DATA_SOURCE_DEFAULT => [
138+
'attribute_set_id' => $this->locator->getProduct()->getAttributeSetId()
139+
],
140+
]
129141
]
130-
]);
142+
);
131143
}
132144
}

0 commit comments

Comments
 (0)