Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Obscure.php
Go to the documentation of this file.
1 <?php
13 
14 class Obscure extends \Magento\Framework\Data\Form\Element\Password
15 {
19  protected $_obscuredValue = '******';
20 
27  public function getEscapedValue($index = null)
28  {
29  $value = parent::getEscapedValue($index);
30  if (!empty($value)) {
31  return $this->_obscuredValue;
32  }
33  return $value;
34  }
35 
41  public function getHtmlAttributes()
42  {
43  return [
44  'type',
45  'title',
46  'class',
47  'style',
48  'onclick',
49  'onchange',
50  'onkeyup',
51  'disabled',
52  'readonly',
53  'maxlength',
54  'tabindex',
55  'data-form-part',
56  'data-role',
57  'data-action'
58  ];
59  }
60 }
$value
Definition: gender.phtml:16
$index
Definition: list.phtml:44