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-store
Model
Config
Reader
Source
Dynamic
DefaultScope.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Store\Model\Config\Reader\Source\Dynamic
;
7
8
use
Magento\Framework\App\Config\Scope\Converter
;
9
use Magento\Store\Model\ResourceModel\Config\Collection\ScopedFactory;
10
use
Magento\Framework\App\Config\Reader\Source\SourceInterface
;
11
use
Magento\Framework\App\Config\ScopeConfigInterface
;
12
16
class
DefaultScope
implements
SourceInterface
17
{
21
private
$collectionFactory;
22
26
private
$converter;
27
32
public
function
__construct
(
33
ScopedFactory $collectionFactory,
34
Converter
$converter
35
) {
36
$this->collectionFactory = $collectionFactory;
37
$this->converter = $converter;
38
}
39
46
public
function
get
($scopeCode =
null
)
47
{
48
try
{
49
$collection
= $this->collectionFactory->create(
50
[
'scope'
=>
ScopeConfigInterface::SCOPE_TYPE_DEFAULT
]
51
);
52
}
catch
(\DomainException $e) {
53
$collection
= [];
54
}
55
$config
= [];
56
foreach
(
$collection
as
$item
) {
57
$config
[
$item
->getPath()] =
$item
->getValue();
58
}
59
return
$this->converter->convert(
$config
);
60
}
61
}
Magento\Store\Model\Config\Reader\Source\Dynamic
Definition:
DefaultScope.php:6
$config
$config
Definition:
fraud_order.php:17
Magento\Store\Model\Config\Reader\Source\Dynamic\DefaultScope\__construct
__construct(ScopedFactory $collectionFactory, Converter $converter)
Definition:
DefaultScope.php:32
Magento\Framework\App\Config\ScopeConfigInterface\SCOPE_TYPE_DEFAULT
const SCOPE_TYPE_DEFAULT
Definition:
ScopeConfigInterface.php:20
Magento\Framework\App\Config\Reader\Source\SourceInterface
Definition:
SourceInterface.php:13
$item
$item
Definition:
partial_invoice.php:27
Magento\Framework\App\Config\Scope\Converter
Definition:
Converter.php:10
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15
Magento\Store\Model\Config\Reader\Source\Dynamic\DefaultScope
Definition:
DefaultScope.php:16
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17