1313use Magento \Catalog \Api \Data \CategoryInterface ;
1414
1515/**
16+ * Category repository
1617 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1718 */
1819class CategoryRepository implements \Magento \Catalog \Api \CategoryRepositoryInterface
@@ -70,7 +71,7 @@ public function __construct(
7071 }
7172
7273 /**
73- * { @inheritdoc}
74+ * @inheritdoc
7475 */
7576 public function save (\Magento \Catalog \Api \Data \CategoryInterface $ category )
7677 {
@@ -106,6 +107,8 @@ public function save(\Magento\Catalog\Api\Data\CategoryInterface $category)
106107 $ parentCategory = $ this ->get ($ parentId , $ storeId );
107108 $ existingData ['path ' ] = $ parentCategory ->getPath ();
108109 $ existingData ['parent_id ' ] = $ parentId ;
110+ $ existingData ['custom_apply_to_products ' ] = $ existingData ['custom_apply_to_products ' ] ?? 0 ;
111+ $ existingData ['custom_use_parent_settings ' ] = $ existingData ['custom_use_parent_settings ' ] ?? 0 ;
109112 }
110113 $ category ->addData ($ existingData );
111114 try {
@@ -125,7 +128,7 @@ public function save(\Magento\Catalog\Api\Data\CategoryInterface $category)
125128 }
126129
127130 /**
128- * { @inheritdoc}
131+ * @inheritdoc
129132 */
130133 public function get ($ categoryId , $ storeId = null )
131134 {
@@ -146,7 +149,7 @@ public function get($categoryId, $storeId = null)
146149 }
147150
148151 /**
149- * { @inheritdoc}
152+ * @inheritdoc
150153 */
151154 public function delete (\Magento \Catalog \Api \Data \CategoryInterface $ category )
152155 {
@@ -167,7 +170,7 @@ public function delete(\Magento\Catalog\Api\Data\CategoryInterface $category)
167170 }
168171
169172 /**
170- * { @inheritdoc}
173+ * @inheritdoc
171174 */
172175 public function deleteByIdentifier ($ categoryId )
173176 {
@@ -208,6 +211,8 @@ protected function validateCategory(Category $category)
208211 }
209212
210213 /**
214+ * Get extensible data object converter
215+ *
211216 * @return \Magento\Framework\Api\ExtensibleDataObjectConverter
212217 *
213218 * @deprecated 101.0.0
@@ -222,6 +227,8 @@ private function getExtensibleDataObjectConverter()
222227 }
223228
224229 /**
230+ * Get metadata pool
231+ *
225232 * @return \Magento\Framework\EntityManager\MetadataPool
226233 */
227234 private function getMetadataPool ()
0 commit comments