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
framework
Mview
Config
Data.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Mview\Config
;
7
8
use
Magento\Framework\Serialize\SerializerInterface
;
9
13
class
Data
extends
\Magento\Framework\Config\Data
14
{
18
protected
$stateCollection
;
19
29
public
function
__construct
(
30
\
Magento
\Framework\Mview\
Config
\
Reader
$reader,
31
\
Magento
\Framework\
Config
\
CacheInterface
$cache,
32
\
Magento
\Framework\Mview\
View
\State\CollectionInterface
$stateCollection
,
33
$cacheId =
'mview_config'
,
34
SerializerInterface
$serializer =
null
35
) {
36
$this->stateCollection =
$stateCollection
;
37
38
$isCacheExists =
$cache
->test($cacheId);
39
40
parent::__construct($reader,
$cache
, $cacheId,
$serializer
);
41
42
if
(!$isCacheExists) {
43
$this->deleteNonexistentStates();
44
}
45
}
46
52
protected
function
deleteNonexistentStates()
53
{
54
foreach
($this->stateCollection->getItems() as $state) {
56
if
(!isset($this->_data[$state->getViewId()])) {
57
$state->delete();
58
}
59
}
60
}
61
}
$serializer
$serializer
Definition:
quote_with_payment_saved.php:10
Magento\Framework\Mview\Config\Reader
Definition:
Reader.php:8
Magento\Framework\Mview\Config\Data\$stateCollection
$stateCollection
Definition:
Data.php:18
Magento\Framework\Mview\Config\Data
Definition:
Data.php:13
Magento\Framework\Serialize\SerializerInterface
Definition:
SerializerInterface.php:14
Magento\Framework\Mview\Config
Definition:
Converter.php:6
Magento\Framework\Mview\Config
Definition:
Config.php:8
Magento\Framework\App\CacheInterface
Definition:
CacheInterface.php:15
Magento
Magento\Framework\Mview\Config\Data\__construct
__construct(\Magento\Framework\Mview\Config\Reader $reader, \Magento\Framework\Config\CacheInterface $cache, \Magento\Framework\Mview\View\State\CollectionInterface $stateCollection, $cacheId='mview_config', SerializerInterface $serializer=null)
Definition:
Data.php:29
$cache
$cache
Definition:
application_cache.php:8
Magento\Framework\Config\Data
Definition:
Data.php:18
Magento\Framework\Mview\View
Definition:
View.php:15