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
Resolver
Group.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Store\Model\Resolver
;
8
9
use
Magento\Framework\App\ScopeInterface
;
10
use
Magento\Framework\App\ScopeResolverInterface
;
11
use
Magento\Framework\Exception\State\InitException
;
12
use
Magento\Store\Model\StoreManagerInterface
;
13
14
class
Group
implements
ScopeResolverInterface
15
{
19
protected
$storeManager
;
20
24
public
function
__construct
(
StoreManagerInterface
$storeManager
)
25
{
26
$this->storeManager =
$storeManager
;
27
}
28
33
public
function
getScope
($scopeId =
null
)
34
{
35
$scope = $this->storeManager->getGroup($scopeId);
36
if
(!$scope instanceof
ScopeInterface
) {
37
throw
new
InitException
(
__
(
'The scope object is invalid. Verify the scope object and try again.'
));
38
}
39
40
return
$scope;
41
}
42
48
public
function
getScopes
()
49
{
50
return
$this->storeManager->getGroups();
51
}
52
}
Magento\Store\Model\Resolver
Definition:
Group.php:7
__
__()
Definition:
__.php:13
Magento\Store\Model\Resolver\Group\getScopes
getScopes()
Definition:
Group.php:48
Magento\Framework\App\ScopeResolverInterface
Definition:
ScopeResolverInterface.php:11
Magento\Framework\App\ScopeInterface
Definition:
ScopeInterface.php:12
Magento\Store\Model\StoreManagerInterface
Definition:
StoreManagerInterface.php:17
Magento\Store\Model\Resolver\Group\__construct
__construct(StoreManagerInterface $storeManager)
Definition:
Group.php:24
Magento\Store\Model\Resolver\Group\getScope
getScope($scopeId=null)
Definition:
Group.php:33
Magento\Store\Model\Resolver\Group\$storeManager
$storeManager
Definition:
Group.php:19
Magento\Store\Model\Resolver\Group
Definition:
Group.php:14
Magento\Framework\Exception\State\InitException
Definition:
InitException.php:16