diff --git a/vendor/magento/module-cms-staging/Model/BlockApplier.php b/vendor/magento/module-cms-staging/Model/BlockApplier.php new file mode 100644 index 00000000000..3abe3898f13 --- /dev/null +++ b/vendor/magento/module-cms-staging/Model/BlockApplier.php @@ -0,0 +1,55 @@ +cacheContext = $cacheContext; + $this->pageIdsList = $pageIdsList ?? ObjectManager::getInstance()->get(PageIdsList::class); + } + + /** + * @inheritdoc + */ + public function execute(array $entityIds) + { + if (!empty($entityIds)) { + $this->cacheContext->registerEntities(Block::CACHE_TAG, $entityIds); + $entityIds = $this->pageIdsList->execute($entityIds); + $this->cacheContext->registerEntities(Page::CACHE_TAG, $entityIds); + } + } +} diff --git a/vendor/magento/module-cms-staging/etc/di.xml b/vendor/magento/module-cms-staging/etc/di.xml index 408920915d8..f814ad02806 100644 --- a/vendor/magento/module-cms-staging/etc/di.xml +++ b/vendor/magento/module-cms-staging/etc/di.xml @@ -44,6 +44,7 @@ Magento\CmsStaging\Model\PageApplier + Magento\CmsStaging\Model\BlockApplier