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-braintree
Ui
Component
Report
Listing
Column
TransactionType.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Braintree\Ui\Component\Report\Listing\Column
;
7
8
use Braintree\Transaction;
9
use
Magento\Framework\Data\OptionSourceInterface
;
10
14
class
TransactionType
implements
OptionSourceInterface
15
{
19
protected
$options
;
20
26
public
function
toOptionArray
()
27
{
28
if
($this->options !==
null
) {
29
return
$this->options
;
30
}
31
32
$types = $this->getAvailableTransactionTypes();
33
foreach
($types as $typeCode => $typeName) {
34
$this->options[$typeCode][
'label'
] = $typeName;
35
$this->options[$typeCode][
'value'
] = $typeCode;
36
}
37
38
return
$this->options
;
39
}
40
44
private
function
getAvailableTransactionTypes()
45
{
46
// @codingStandardsIgnoreStart
47
return
[
48
Transaction::SALE =>
__
(Transaction::SALE),
49
Transaction::CREDIT =>
__
(Transaction::CREDIT)
50
];
51
// @codingStandardsIgnoreEnd
52
}
53
}
Magento\Braintree\Ui\Component\Report\Listing\Column\TransactionType
Definition:
TransactionType.php:14
Magento\Braintree\Ui\Component\Report\Listing\Column
Definition:
PaymentType.php:6
__
__()
Definition:
__.php:13
Magento\Framework\Data\OptionSourceInterface
Definition:
OptionSourceInterface.php:14
Magento\Braintree\Ui\Component\Report\Listing\Column\TransactionType\toOptionArray
toOptionArray()
Definition:
TransactionType.php:26
Magento\Braintree\Ui\Component\Report\Listing\Column\TransactionType\$options
$options
Definition:
TransactionType.php:19