Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CcTypes.php
Go to the documentation of this file.
1 <?php
7 
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 }
__construct(Context $context, CcType $ccTypeHelper, array $data=[])
Definition: CcTypes.php:29
$value
Definition: gender.phtml:16