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
Block
Adminhtml
Form
Field
CcTypes.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Braintree\Block\Adminhtml\Form\Field
;
7
8
use
Magento\Braintree\Helper\CcType
;
9
use
Magento\Framework\View\Element\Context
;
10
use
Magento\Framework\View\Element\Html\Select
;
11
15
class
CcTypes
extends
Select
16
{
20
private
$ccTypeHelper;
21
29
public
function
__construct
(
30
Context
$context,
31
CcType
$ccTypeHelper,
32
array
$data
= []
33
) {
34
parent::__construct($context,
$data
);
35
$this->ccTypeHelper = $ccTypeHelper;
36
}
37
43
protected
function
_toHtml
()
44
{
45
if
(!$this->
getOptions
()) {
46
$this->
setOptions
($this->ccTypeHelper->getCcTypes());
47
}
48
$this->
setClass
(
'cc-type-select'
);
49
$this->setExtraParams(
'multiple="multiple"'
);
50
return
parent::_toHtml();
51
}
52
59
public
function
setInputName
(
$value
)
60
{
61
return
$this->setName(
$value
.
'[]'
);
62
}
63
}
Magento\Framework\View\Element\Html\Select\setOptions
setOptions($options)
Definition:
Select.php:36
Magento\Framework\View\Element\Html\Select
Definition:
Select.php:11
Magento\Braintree\Block\Adminhtml\Form\Field\CcTypes\setInputName
setInputName($value)
Definition:
CcTypes.php:59
Magento\Braintree\Block\Adminhtml\Form\Field\CcTypes
Definition:
CcTypes.php:15
Magento\Framework\View\Element\Html\Select\getOptions
getOptions()
Definition:
Select.php:25
Magento\Braintree\Block\Adminhtml\Form\Field\CcTypes\__construct
__construct(Context $context, CcType $ccTypeHelper, array $data=[])
Definition:
CcTypes.php:29
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
$value
$value
Definition:
gender.phtml:16
Magento\Braintree\Helper\CcType
Definition:
CcType.php:13
Magento\Braintree\Block\Adminhtml\Form\Field
Definition:
CcTypes.php:6
Magento\Framework\View\Element\Context
Definition:
Context.php:25
Magento\Framework\View\Element\Html\Select\setClass
setClass($class)
Definition:
Select.php:74
Magento\Braintree\Block\Adminhtml\Form\Field\CcTypes\_toHtml
_toHtml()
Definition:
CcTypes.php:43