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-multishipping
Block
DataProviders
Overview.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Multishipping\Block\DataProviders
;
9
10
use
Magento\Framework\Session\SessionManagerInterface
;
11
use
Magento\Framework\View\Element\Block\ArgumentInterface
;
12
use
Magento\Quote\Model\Quote\Address
;
13
17
class
Overview
implements
ArgumentInterface
18
{
22
private
$session;
23
27
private
$addressErrors = [];
28
32
public
function
__construct
(
33
SessionManagerInterface
$session
34
) {
35
$this->session =
$session
;
36
}
37
44
public
function
getAddressError
(
Address
$address
): string
45
{
46
$addressErrors = $this->
getAddressErrors
();
47
48
return
$addressErrors[
$address
->getId()] ??
''
;
49
}
50
56
public
function
getAddressErrors
(): array
57
{
58
if
(empty($this->addressErrors)) {
59
$this->addressErrors = $this->session->getAddressErrors(
true
);
60
}
61
62
return
$this->addressErrors ?? [];
63
}
64
71
public
function
getAddressAnchorName
(
int
$addressId): string
72
{
73
return
'a'
. $addressId;
74
}
75
}
Magento\Multishipping\Block\DataProviders\Overview
Definition:
Overview.php:17
Magento\Framework\View\Element\Block\ArgumentInterface
Definition:
ArgumentInterface.php:15
$address
$address
Definition:
customer.php:38
$session
$session
Definition:
quote_with_configurable_product_last_variation.php:62
Magento\Multishipping\Block\DataProviders\Overview\__construct
__construct(SessionManagerInterface $session)
Definition:
Overview.php:32
Magento\Multishipping\Block\DataProviders\Overview\getAddressError
getAddressError(Address $address)
Definition:
Overview.php:44
Magento\Framework\Session\SessionManagerInterface
Definition:
SessionManagerInterface.php:16
Magento\Quote\Model\Quote\Address
Definition:
BillingAddressPersister.php:6
Magento\Multishipping\Block\DataProviders
Definition:
Billing.php:8
Magento\Multishipping\Block\DataProviders\Overview\getAddressAnchorName
getAddressAnchorName(int $addressId)
Definition:
Overview.php:71
Magento\Quote\Model\Quote\Address
Definition:
Address.php:100
Magento\Multishipping\Block\DataProviders\Overview\getAddressErrors
getAddressErrors()
Definition:
Overview.php:56