1 | <?php |
||
9 | class PasswordField extends TextField { |
||
10 | |||
11 | /** |
||
12 | * Controls the autocomplete attribute on the field. |
||
13 | * |
||
14 | * Setting it to false will set the attribute to "off", which will hint the browser |
||
15 | * to not cache the password and to not use any password managers. |
||
16 | */ |
||
17 | private static $autocomplete; |
||
18 | |||
19 | /** |
||
20 | * If true, the field can accept a value attribute, e.g. from posted form data |
||
21 | * @var bool |
||
22 | */ |
||
23 | protected $allowValuePostback = false; |
||
24 | |||
25 | |||
26 | /** |
||
27 | * Returns an input field. |
||
28 | * |
||
29 | * @param string $name |
||
30 | * @param null|string $title |
||
31 | * @param string $value |
||
32 | */ |
||
33 | public function __construct($name, $title = null, $value = '') { |
||
43 | |||
44 | /** |
||
45 | * @param bool $bool |
||
46 | * @return $this |
||
47 | */ |
||
48 | public function setAllowValuePostback($bool) { |
||
53 | |||
54 | /** |
||
55 | * @return bool |
||
56 | */ |
||
57 | public function getAllowValuePostback() { |
||
60 | |||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function getAttributes() { |
||
88 | |||
89 | /** |
||
90 | * Creates a read-only version of the field. |
||
91 | * |
||
92 | * @return FormField |
||
93 | */ |
||
94 | public function performReadonlyTransformation() { |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function Type() { |
||
108 | } |
||
109 |