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
Model
Indexer
AbstractFlatState.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Model\Indexer
;
7
8
use
Magento\Store\Model\ScopeInterface
;
9
14
abstract
class
AbstractFlatState
15
{
19
const
INDEXER_ID
=
''
;
20
24
const
INDEXER_ENABLED_XML_PATH
=
''
;
25
29
protected
$scopeConfig
;
30
34
protected
$isAvailable
;
35
39
protected
$indexerRegistry
;
40
46
public
function
__construct
(
47
\
Magento
\Framework\
App
\
Config
\
ScopeConfigInterface
$scopeConfig
,
48
\
Magento
\Framework\Indexer\IndexerRegistry
$indexerRegistry
,
49
$isAvailable
=
false
50
) {
51
$this->scopeConfig =
$scopeConfig
;
52
$this->indexerRegistry =
$indexerRegistry
;
53
$this->
isAvailable
=
$isAvailable
;
54
}
55
61
public
function
isFlatEnabled
()
62
{
63
return
$this->scopeConfig->isSetFlag(static::INDEXER_ENABLED_XML_PATH,
ScopeInterface::SCOPE_STORE
);
64
}
65
71
public
function
isAvailable
()
72
{
73
return
$this->
isAvailable
&& $this->
isFlatEnabled
()
74
&& $this->indexerRegistry->get(static::INDEXER_ID)->isValid();
75
}
76
}
Magento\Catalog\Model\Indexer
Magento\Framework\App
Magento\Store\Model\ScopeInterface\SCOPE_STORE
const SCOPE_STORE
Definition:
ScopeInterface.php:21
Magento\TestFramework\ObjectManager\Config
Definition:
Config.php:8
Magento\Catalog\Model\Indexer\AbstractFlatState
Definition:
AbstractFlatState.php:14
Magento\Catalog\Model\Indexer\AbstractFlatState\INDEXER_ID
const INDEXER_ID
Definition:
AbstractFlatState.php:19
Magento\Catalog\Model\Indexer\AbstractFlatState\INDEXER_ENABLED_XML_PATH
const INDEXER_ENABLED_XML_PATH
Definition:
AbstractFlatState.php:24
Magento\Catalog\Model\Indexer\AbstractFlatState\isFlatEnabled
isFlatEnabled()
Definition:
AbstractFlatState.php:61
Magento\Store\Model\ScopeInterface
Definition:
ScopeInterface.php:12
Magento\Catalog\Model\Indexer\AbstractFlatState\$isAvailable
$isAvailable
Definition:
AbstractFlatState.php:34
Magento\Catalog\Model\Indexer\AbstractFlatState\__construct
__construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry, $isAvailable=false)
Definition:
AbstractFlatState.php:46
Magento\Catalog\Model\Indexer\AbstractFlatState\$indexerRegistry
$indexerRegistry
Definition:
AbstractFlatState.php:39
Magento
Magento\Catalog\Model\Indexer\AbstractFlatState\$scopeConfig
$scopeConfig
Definition:
AbstractFlatState.php:29
Magento\Catalog\Model\Indexer\AbstractFlatState\isAvailable
isAvailable()
Definition:
AbstractFlatState.php:71
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15