Skip to content

Commit 35328a8

Browse files
author
Yauhen_Lyskavets
committed
MC-16455: Admin user with permission for 1 store can manage categories
- CSV test errors fixed.
1 parent ccbdcc5 commit 35328a8

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

app/code/Magento/Catalog/Model/Category/DataProvider.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public function __construct(
215215
* @inheritdoc
216216
* @since 101.1.0
217217
*/
218-
public function getMeta(): array
218+
public function getMeta()
219219
{
220220
$meta = parent::getMeta();
221221
$meta = $this->prepareMeta($meta);
@@ -274,7 +274,10 @@ private function addUseDefaultValueCheckbox(Category $category, array $meta): ar
274274
}
275275

276276
/**
277-
* @inheritDoc
277+
* Prepare meta data
278+
*
279+
* @param array $meta
280+
* @return array
278281
* @since 101.0.0
279282
*/
280283
public function prepareMeta($meta)
@@ -320,7 +323,9 @@ private function prepareFieldsMeta(array $fieldsMap, array $fieldsMeta): array
320323
}
321324

322325
/**
323-
* @inheritDoc
326+
* Get data
327+
*
328+
* @return array
324329
* @since 101.0.0
325330
*/
326331
public function getData()
@@ -411,7 +416,7 @@ public function getAttributesMeta(Type $entityType)
411416
* @return array
412417
* @since 101.0.0
413418
*/
414-
protected function addUseConfigSettings($categoryData): array
419+
protected function addUseConfigSettings($categoryData)
415420
{
416421
foreach ($this->elementsWithUseConfigSetting as $elementsWithUseConfigSetting) {
417422
if (!isset($categoryData['use_config'][$elementsWithUseConfigSetting])) {
@@ -436,7 +441,7 @@ protected function addUseConfigSettings($categoryData): array
436441
* @deprecated 101.1.0
437442
* @since 101.0.0
438443
*/
439-
protected function addUseDefaultSettings($category, $categoryData): array
444+
protected function addUseDefaultSettings($category, $categoryData)
440445
{
441446
if ($category->getExistsStoreValueFlag('url_key') ||
442447
$category->getStoreId() === Store::DEFAULT_STORE_ID
@@ -510,7 +515,7 @@ public function getScopeLabel(EavAttribute $attribute)
510515
* @return array
511516
* @since 101.0.0
512517
*/
513-
protected function filterFields($categoryData): array
518+
protected function filterFields($categoryData)
514519
{
515520
return array_diff_key($categoryData, array_flip($this->ignoreFields));
516521
}
@@ -558,7 +563,10 @@ private function convertValues($category, $categoryData): array
558563
}
559564

560565
/**
561-
* @inheritDoc
566+
* Category's fields default values
567+
*
568+
* @param array $result
569+
* @return array
562570
* @since 101.0.0
563571
*/
564572
public function getDefaultMetaData($result)
@@ -572,7 +580,9 @@ public function getDefaultMetaData($result)
572580
}
573581

574582
/**
575-
* @inheritDoc
583+
* List of fields groups and fields.
584+
*
585+
* @return array
576586
* @since 101.0.0
577587
*/
578588
protected function getFieldsMap()

0 commit comments

Comments
 (0)