22 private $categoryIdList = [];
27 private $productResource;
37 private $storeManager;
42 private $tableMaintainer;
70 if (!isset($this->categoryIdList[
$productId])) {
71 $unionTables[] = $this->
getCategorySelect($productId, $this->category->getCategoryProductTable());
72 foreach ($this->storeManager->getStores() as
$store) {
75 $this->tableMaintainer->getMainTable(
$store->getId())
83 $this->categoryIdList[
$productId] = $this->productResource->getConnection()->fetchCol($unionSelect);
98 return $this->productResource->getConnection()->select()->from(
getCategorySelect($productId, $tableName)
getCategoryIds($productId)
__construct(ResourceModel\Product $productResource, ResourceModel\Category $category, StoreManagerInterface $storeManager=null, TableMaintainer $tableMaintainer=null)