Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Button.php
Go to the documentation of this file.
1 <?php
13 
15 
16 class Button extends AbstractElement
17 {
23  protected $_htmlAttributes = ['data-mage-init'];
24 
31  public function __construct(
32  Factory $factoryElement,
33  CollectionFactory $factoryCollection,
34  Escaper $escaper,
35  $data = []
36  ) {
37  parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
38  $this->setType('button');
39  $this->setExtType('textfield');
40  }
41 
47  public function getHtmlAttributes()
48  {
49  $attributes = parent::getHtmlAttributes();
50  return array_merge($attributes, $this->_htmlAttributes);
51  }
52 }
$attributes
Definition: matrix.phtml:13
__construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data=[])
Definition: Button.php:31