44 * Copyright © Magento, Inc. All rights reserved.
55 * See COPYING.txt for license details.
66 */
7+ declare (strict_types=1 );
78
89namespace Magento \Catalog \Model ;
910
1011use Magento \Framework \Exception \NoSuchEntityException ;
1112use Magento \Framework \Exception \StateException ;
1213
14+ /**
15+ * Class \Magento\Catalog\Model\ProductAttributeGroupRepository
16+ */
1317class ProductAttributeGroupRepository implements \Magento \Catalog \Api \ProductAttributeGroupRepositoryInterface
1418{
1519 /**
@@ -43,23 +47,29 @@ public function __construct(
4347 }
4448
4549 /**
46- * { @inheritdoc}
50+ * @inheritdoc
4751 */
4852 public function save (\Magento \Eav \Api \Data \AttributeGroupInterface $ group )
4953 {
54+ /** @var \Magento\Catalog\Model\Product\Attribute\Group $group */
55+ $ extensionAttributes = $ group ->getExtensionAttributes ();
56+ if ($ extensionAttributes ) {
57+ $ group ->setSortOrder ($ extensionAttributes ->getSortOrder ());
58+ $ group ->setAttributeGroupCode ($ extensionAttributes ->getAttributeGroupCode ());
59+ }
5060 return $ this ->groupRepository ->save ($ group );
5161 }
5262
5363 /**
54- * { @inheritdoc}
64+ * @inheritdoc
5565 */
5666 public function getList (\Magento \Framework \Api \SearchCriteriaInterface $ searchCriteria )
5767 {
5868 return $ this ->groupRepository ->getList ($ searchCriteria );
5969 }
6070
6171 /**
62- * { @inheritdoc}
72+ * @inheritdoc
6373 */
6474 public function get ($ groupId )
6575 {
@@ -75,7 +85,7 @@ public function get($groupId)
7585 }
7686
7787 /**
78- * { @inheritdoc}
88+ * @inheritdoc
7989 */
8090 public function deleteById ($ groupId )
8191 {
@@ -86,7 +96,7 @@ public function deleteById($groupId)
8696 }
8797
8898 /**
89- * { @inheritdoc}
99+ * @inheritdoc
90100 */
91101 public function delete (\Magento \Eav \Api \Data \AttributeGroupInterface $ group )
92102 {
0 commit comments