Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
Plugin
Model
Product
Action
UpdateAttributesFlushCache.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Plugin\Model\Product\Action
;
7
8
use
Magento\Catalog\Model\Product\Action
;
9
use
Magento\Framework\Indexer\CacheContext
;
10
use
Magento\Framework\Event\ManagerInterface
as EventManager;
11
12
class
UpdateAttributesFlushCache
13
{
17
protected
$cacheContext
;
18
22
protected
$eventManager
;
23
28
public
function
__construct
(
29
CacheContext
$cacheContext
,
30
EventManager
$eventManager
31
) {
32
$this->cacheContext =
$cacheContext
;
33
$this->eventManager =
$eventManager
;
34
}
35
43
public
function
afterUpdateAttributes
(
44
\
Magento
\Catalog\Model\Product\
Action
$subject,
45
\
Magento
\Catalog\Model\Product\
Action
$result
46
) {
47
$this->eventManager->dispatch(
'clean_cache_by_tags'
, [
'object'
=> $this->cacheContext]);
48
return
$result
;
49
}
50
57
public
function
afterUpdateWebsites
(
58
\
Magento
\Catalog\Model\Product\
Action
$subject
59
) {
60
$this->eventManager->dispatch(
'clean_cache_by_tags'
, [
'object'
=> $this->cacheContext]);
61
}
62
}
Magento\Catalog\Model\Product\Action
Definition:
Action.php:17
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Catalog\Plugin\Model\Product\Action\UpdateAttributesFlushCache
Definition:
UpdateAttributesFlushCache.php:12
Magento\Catalog\Plugin\Model\Product\Action\UpdateAttributesFlushCache\__construct
__construct(CacheContext $cacheContext, EventManager $eventManager)
Definition:
UpdateAttributesFlushCache.php:28
Magento\Catalog\Plugin\Model\Product\Action\UpdateAttributesFlushCache\$eventManager
$eventManager
Definition:
UpdateAttributesFlushCache.php:22
Magento\Catalog\Plugin\Model\Product\Action
Definition:
UpdateAttributesFlushCache.php:6
Magento\Catalog\Plugin\Model\Product\Action\UpdateAttributesFlushCache\afterUpdateAttributes
afterUpdateAttributes(\Magento\Catalog\Model\Product\Action $subject, \Magento\Catalog\Model\Product\Action $result)
Definition:
UpdateAttributesFlushCache.php:43
Magento\Catalog\Plugin\Model\Product\Action\UpdateAttributesFlushCache\$cacheContext
$cacheContext
Definition:
UpdateAttributesFlushCache.php:17
Magento\Framework\Event\ManagerInterface
Definition:
ManagerInterface.php:12
Magento
Magento\Framework\Indexer\CacheContext
Definition:
CacheContext.php:11
Magento\Catalog\Plugin\Model\Product\Action\UpdateAttributesFlushCache\afterUpdateWebsites
afterUpdateWebsites(\Magento\Catalog\Model\Product\Action $subject)
Definition:
UpdateAttributesFlushCache.php:57