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
ScopeTypeNormalizer.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Store\Model
;
7
11
class
ScopeTypeNormalizer
12
{
49
public
function
normalize
($scopeType, $plural =
true
)
50
{
51
$replaces = [
52
ScopeInterface::SCOPE_WEBSITE
=>
ScopeInterface::SCOPE_WEBSITES
,
53
ScopeInterface::SCOPE_GROUP
=>
ScopeInterface::SCOPE_GROUPS
,
54
ScopeInterface::SCOPE_STORE
=>
ScopeInterface::SCOPE_STORES
,
55
];
56
57
if
(!$plural) {
58
$replaces = array_flip($replaces);
59
}
60
61
return
$replaces[$scopeType] ?? $scopeType;
62
}
63
}
Magento\Store\Model\ScopeTypeNormalizer\normalize
normalize($scopeType, $plural=true)
Definition:
ScopeTypeNormalizer.php:49
Magento\Store\Model\ScopeInterface\SCOPE_STORE
const SCOPE_STORE
Definition:
ScopeInterface.php:21
Magento\Store\Model\ScopeInterface\SCOPE_WEBSITES
const SCOPE_WEBSITES
Definition:
ScopeInterface.php:19
Magento\Store\Model\ScopeInterface\SCOPE_GROUPS
const SCOPE_GROUPS
Definition:
ScopeInterface.php:18
Magento\Store\Model\ScopeTypeNormalizer
Definition:
ScopeTypeNormalizer.php:11
Magento\Store\Model
Magento\Store\Model\ScopeInterface\SCOPE_STORES
const SCOPE_STORES
Definition:
ScopeInterface.php:17
Magento\Store\Model\ScopeInterface\SCOPE_GROUP
const SCOPE_GROUP
Definition:
ScopeInterface.php:22
Magento\Store\Model\ScopeInterface\SCOPE_WEBSITE
const SCOPE_WEBSITE
Definition:
ScopeInterface.php:23