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-ups
Model
Config
Source
Generic.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Ups\Model\Config\Source
;
7
8
use
Magento\Shipping\Model\Carrier\Source\GenericInterface
;
9
13
class
Generic
implements
GenericInterface
14
{
18
protected
$carrierConfig
;
19
25
protected
$_code
=
''
;
26
30
public
function
__construct
(\
Magento
\Ups\Helper\
Config
$carrierConfig
)
31
{
32
$this->carrierConfig =
$carrierConfig
;
33
}
34
40
public
function
toOptionArray
()
41
{
42
$configData
= $this->carrierConfig->getCode($this->_code);
43
$arr = [];
44
foreach
(
$configData
as
$code
=>
$title
) {
45
$arr[] = [
'value'
=>
$code
,
'label'
=>
__
(
$title
)];
46
}
47
return
$arr;
48
}
49
}
$title
$title
Definition:
default.phtml:14
Magento\Ups\Model\Config\Source\Generic\__construct
__construct(\Magento\Ups\Helper\Config $carrierConfig)
Definition:
Generic.php:30
Magento\Ups\Model\Config\Source\Generic\$carrierConfig
$carrierConfig
Definition:
Generic.php:18
__
__()
Definition:
__.php:13
Magento\Ups\Helper\Config
Definition:
Config.php:14
$configData
$configData
Definition:
payment_configuration.php:26
Magento\Ups\Model\Config\Source\Generic\$_code
$_code
Definition:
Generic.php:25
Magento\Ups\Model\Config\Source
Definition:
Container.php:6
Magento
Magento\Ups\Model\Config\Source\Generic\toOptionArray
toOptionArray()
Definition:
Generic.php:40
Magento\Shipping\Model\Carrier\Source\GenericInterface
Definition:
GenericInterface.php:13
$code
$code
Definition:
info.phtml:12
Magento\Ups\Model\Config\Source\Generic
Definition:
Generic.php:13