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-checkout
Model
Layout
AbstractTotalsProcessor.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Checkout\Model\Layout
;
7
8
use
Magento\Framework\App\Config\ScopeConfigInterface
;
9
19
abstract
class
AbstractTotalsProcessor
20
{
26
protected
$scopeConfig
;
27
32
public
function
__construct
(
33
ScopeConfigInterface
$scopeConfig
34
) {
35
$this->scopeConfig =
$scopeConfig
;
36
}
37
42
public
function
sortTotals
(
$totals
)
43
{
44
$configData
= $this->scopeConfig->getValue(
'sales/totals_sort'
);
45
foreach
(
$totals
as
$code
=> &$total) {
46
//convert JS naming style to config naming style
47
$code
= str_replace(
'-'
,
'_'
,
$code
);
48
if
(array_key_exists(
$code
,
$configData
)) {
49
$total[
'sortOrder'
] =
$configData
[
$code
];
50
}
51
}
52
53
return
$totals
;
54
}
55
}
Magento\Checkout\Model\Layout
Definition:
AbstractTotalsProcessor.php:6
$totals
$totals
Definition:
totalbar.phtml:10
Magento\Checkout\Model\Layout\AbstractTotalsProcessor\$scopeConfig
$scopeConfig
Definition:
AbstractTotalsProcessor.php:26
$configData
$configData
Definition:
payment_configuration.php:26
Magento\Checkout\Model\Layout\AbstractTotalsProcessor\sortTotals
sortTotals($totals)
Definition:
AbstractTotalsProcessor.php:42
Magento\Checkout\Model\Layout\AbstractTotalsProcessor
Definition:
AbstractTotalsProcessor.php:19
Magento\Checkout\Model\Layout\AbstractTotalsProcessor\__construct
__construct(ScopeConfigInterface $scopeConfig)
Definition:
AbstractTotalsProcessor.php:32
Magento\Framework\App\Config\ScopeConfigInterface
Definition:
ScopeConfigInterface.php:15
$code
$code
Definition:
info.phtml:12