Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Text.php
Go to the documentation of this file.
1 <?php
8 
10 
14 class Text extends AbstractElement
15 {
22  public function __construct(
23  Factory $factoryElement,
24  CollectionFactory $factoryCollection,
25  Escaper $escaper,
26  $data = []
27  ) {
28  parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
29  $this->setType('text');
30  $this->setExtType('textfield');
31  }
32 
38  public function getHtml()
39  {
40  $this->addClass('input-text admin__control-text');
41  return parent::getHtml();
42  }
43 
49  public function getHtmlAttributes()
50  {
51  return [
52  'type',
53  'title',
54  'class',
55  'style',
56  'onclick',
57  'onchange',
58  'onkeyup',
59  'disabled',
60  'readonly',
61  'maxlength',
62  'tabindex',
63  'placeholder',
64  'data-form-part',
65  'data-role',
66  'data-validation-params',
67  'data-action'
68  ];
69  }
70 }
__construct(Factory $factoryElement, CollectionFactory $factoryCollection, Escaper $escaper, $data=[])
Definition: Text.php:22