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-dhl
Model
Source
Method
AbstractMethod.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Dhl\Model\Source\Method
;
7
11
abstract
class
AbstractMethod
extends
\Magento\Dhl\Model\Source\Method\Generic
12
{
18
protected
$_contentType
;
19
25
protected
$_noneMethod
=
false
;
26
30
public
function
toOptionArray
()
31
{
32
/* @var $carrierModel \Magento\Dhl\Model\Carrier */
33
$carrierModel =
$this->_shippingDhl
;
34
$dhlProducts = $carrierModel->getDhlProducts($this->_contentType);
35
36
$options
= [];
37
foreach
($dhlProducts as
$code
=>
$title
) {
38
$options
[] = [
'value'
=>
$code
,
'label'
=>
$title
];
39
}
40
41
if
($this->_noneMethod) {
42
array_unshift(
$options
, [
'value'
=>
''
,
'label'
=>
__
(
'None'
)]);
43
}
44
45
return
$options
;
46
}
47
}
$title
$title
Definition:
default.phtml:14
Magento\Dhl\Model\Source\Method\AbstractMethod
Definition:
AbstractMethod.php:11
Magento\Dhl\Model\Source\Method
Definition:
AbstractMethod.php:6
Magento\Dhl\Model\Source\Method\AbstractMethod\toOptionArray
toOptionArray()
Definition:
AbstractMethod.php:30
Magento\Dhl\Model\Source\Method\Generic
Definition:
Generic.php:8
Magento\Dhl\Model\Source\Method\AbstractMethod\$_contentType
$_contentType
Definition:
AbstractMethod.php:18
Magento\Dhl\Model\Source\Method\Generic\$_shippingDhl
$_shippingDhl
Definition:
Generic.php:13
__
__()
Definition:
__.php:13
Magento\Dhl\Model\Source\Method\AbstractMethod\$_noneMethod
$_noneMethod
Definition:
AbstractMethod.php:25
$options
$options
Definition:
multiple_mixed_products.php:29
$code
$code
Definition:
info.phtml:12