private getAffectedProductIds ( Magento\Catalog\Model\Category $category ) : array | ||
$category | Magento\Catalog\Model\Category | Category |
return | array |
private function getAffectedProductIds($category)
{
$oldPositionProductIds = array_keys($this->saveHandler->getProductPositionsByCategory($category));
$newPositionProductIds = array_keys($category->getSortedProducts());
$affectedProductIds = array_merge($oldPositionProductIds, $newPositionProductIds);
if ($category->getAffectedProductIds()) {
$affectedProductIds = array_merge($affectedProductIds, $category->getAffectedProductIds());
}
return $affectedProductIds;
}