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
App
ScopeResolver.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App
;
7
8
use
Magento\Framework\ObjectManagerInterface
;
9
10
class
ScopeResolver
implements
ScopeResolverInterface
11
{
15
protected
$objectManager
;
16
20
private
$defaultScope;
21
27
public
function
__construct
(
ObjectManagerInterface
$objectManager
)
28
{
29
$this->objectManager =
$objectManager
;
30
}
31
36
public
function
getScope
($scopeId =
null
)
37
{
38
if
(!$this->defaultScope) {
39
$this->defaultScope = $this->objectManager->create(ScopeDefault::class);
40
}
41
42
return
$this->defaultScope;
43
}
44
50
public
function
getScopes
()
51
{
52
return
[$this->defaultScope];
53
}
54
}
Magento\Framework\App
Magento\Framework\App\ScopeResolver
Definition:
ScopeResolver.php:10
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\App\ScopeResolverInterface
Definition:
ScopeResolverInterface.php:11
Magento\Framework\App\ScopeResolver\getScopes
getScopes()
Definition:
ScopeResolver.php:50
Magento\Framework\App\ScopeResolver\$objectManager
$objectManager
Definition:
ScopeResolver.php:15
Magento\Framework\App\ScopeResolver\getScope
getScope($scopeId=null)
Definition:
ScopeResolver.php:36
Magento\Framework\App\ScopeResolver\__construct
__construct(ObjectManagerInterface $objectManager)
Definition:
ScopeResolver.php:27