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
StoresConfig.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Store\Model
;
8
9
use
Magento\Framework\Exception\NoSuchEntityException
;
10
11
class
StoresConfig
12
{
16
protected
$_storeManager
;
17
21
protected
$_config
;
22
27
public
function
__construct
(
28
\
Magento
\
Store
\Model\
StoreManagerInterface
$storeManager
,
29
\
Magento
\Framework\
App
\
Config
\
ScopeConfigInterface
$config
30
) {
31
$this->_storeManager =
$storeManager
;
32
$this->_config =
$config
;
33
}
34
43
public
function
getStoresConfigByPath(
$path
)
44
{
45
$stores
= $this->_storeManager->getStores(
true
);
46
$storeValues = [];
48
foreach
(
$stores
as
$store
) {
49
try
{
50
$value
= $this->_config->getValue(
$path
,
ScopeInterface::SCOPE_STORE
,
$store
->getCode());
51
$storeValues[
$store
->getId()] =
$value
;
52
}
catch
(NoSuchEntityException $e) {
53
// Store doesn't really exist, so move on.
54
continue
;
55
}
56
}
57
return
$storeValues;
58
}
59
}
Magento\Framework\App
Magento\Store\Model\ScopeInterface\SCOPE_STORE
const SCOPE_STORE
Definition:
ScopeInterface.php:21
$config
$config
Definition:
fraud_order.php:17
$storeManager
$storeManager
Definition:
paypal_quote.php:14
Magento\Store\Model
Magento\Store\Model\StoreManagerInterface
Definition:
StoreManagerInterface.php:17
$value
$value
Definition:
gender.phtml:16
Magento\Store\Model\StoresConfig\$_storeManager
$_storeManager
Definition:
StoresConfig.php:16
Magento
$store
$store
Definition:
payment_configuration_rollback.php:33
Magento\Store\Model\Store
Definition:
Store.php:38
Magento\Framework\App\Config
Definition:
Config.php:17
Magento\Store\Model\StoresConfig\__construct
__construct(\Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $config)
Definition:
StoresConfig.php:27
Magento\Store\Model\StoresConfig\$_config
$_config
Definition:
StoresConfig.php:21
$stores
$stores
Definition:
website_attribute_sync.php:95
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15
Magento\Store\Model\StoresConfig
Definition:
StoresConfig.php:11
$path
$path
Definition:
import_with_filesystem_images.php:14
Magento\Framework\Exception\NoSuchEntityException
Definition:
NoSuchEntityException.php:16