Skip to content

Commit 9e657ad

Browse files
committed
Moving the method's logic into construct
1 parent a0be69b commit 9e657ad

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/ProductDataProvider.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function __construct(
6868
$this->addFieldStrategies = $addFieldStrategies;
6969
$this->addFilterStrategies = $addFilterStrategies;
7070
$this->modifiersPool = $modifiersPool ?: ObjectManager::getInstance()->get(PoolInterface::class);
71-
$this->setDefaultStoreToCollection();
71+
$this->getCollection()->setStoreId(Store::DEFAULT_STORE_ID);
7272
}
7373

7474
/**
@@ -142,12 +142,4 @@ public function getMeta()
142142

143143
return $meta;
144144
}
145-
146-
/**
147-
* Filter the product collection by Default Store if no filter is applied
148-
*/
149-
private function setDefaultStoreToCollection()
150-
{
151-
$this->getCollection()->setStoreId(Store::DEFAULT_STORE_ID);
152-
}
153145
}

0 commit comments

Comments
 (0)