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
Website.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Store\Model\Resolver
;
8
9
class
Website
implements
\Magento\Framework\App\ScopeResolverInterface
10
{
14
protected
$_storeManager
;
15
19
public
function
__construct
(
20
\
Magento
\
Store
\Model\
StoreManagerInterface
$storeManager
21
) {
22
$this->_storeManager =
$storeManager
;
23
}
24
29
public
function
getScope
($scopeId =
null
)
30
{
31
$scope = $this->_storeManager->getWebsite($scopeId);
32
if
(!($scope instanceof \
Magento
\Framework\
App
\
ScopeInterface
)) {
33
throw
new \Magento\Framework\Exception\State\InitException(
34
__
(
'The scope object is invalid. Verify the scope object and try again.'
)
35
);
36
}
37
38
return
$scope;
39
}
40
46
public
function
getScopes
()
47
{
48
return
$this->_storeManager->getWebsites();
49
}
50
}
Magento\Framework\App
Magento\Store\Model\Resolver
Definition:
Group.php:7
Magento\Store\Model\Resolver\Website
Definition:
Website.php:9
Magento\Store\Model\Resolver\Website\__construct
__construct(\Magento\Store\Model\StoreManagerInterface $storeManager)
Definition:
Website.php:19
$storeManager
$storeManager
Definition:
paypal_quote.php:14
__
__()
Definition:
__.php:13
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\Website\$_storeManager
$_storeManager
Definition:
Website.php:14
Magento\Store\Model\Resolver\Store
Definition:
Store.php:9
Magento
Magento\Store\Model\Resolver\Website\getScope
getScope($scopeId=null)
Definition:
Website.php:29
Magento\Store\Model\Resolver\Website\getScopes
getScopes()
Definition:
Website.php:46