|
Revision 30762, 1.7 kB
(checked in by fabien, 3 years ago)
|
[1.3, 1.4] fixed phpdoc (closes #8931)
|
- Property svn:mime-type set to
text/x-php
- Property svn:eol-style set to
native
- Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
class sfWidgetFormInputPassword extends sfWidgetFormInput |
|---|
| 20 |
{ |
|---|
| 21 |
|
|---|
| 22 |
* Configures the current widget. |
|---|
| 23 |
* |
|---|
| 24 |
* Available options: |
|---|
| 25 |
* |
|---|
| 26 |
* * always_render_empty: true if you want the input value to be always empty when rendering (true by default) |
|---|
| 27 |
* |
|---|
| 28 |
* @param array $options An array of options |
|---|
| 29 |
* @param array $attributes An array of default HTML attributes |
|---|
| 30 |
* |
|---|
| 31 |
* @see sfWidgetFormInput |
|---|
| 32 |
*/ |
|---|
| 33 |
protected function configure($options = array(), $attributes = array()) |
|---|
| 34 |
{ |
|---|
| 35 |
parent::configure($options, $attributes); |
|---|
| 36 |
|
|---|
| 37 |
$this->addOption('always_render_empty', true); |
|---|
| 38 |
|
|---|
| 39 |
$this->setOption('type', 'password'); |
|---|
| 40 |
} |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
* Renders the widget. |
|---|
| 44 |
* |
|---|
| 45 |
* @param string $name The element name |
|---|
| 46 |
* @param string $value The password stored in this widget, will be masked by the browser. |
|---|
| 47 |
* @param array $attributes An array of HTML attributes to be merged with the default HTML attributes |
|---|
| 48 |
* @param array $errors An array of errors for the field |
|---|
| 49 |
* |
|---|
| 50 |
* @return string An HTML tag string |
|---|
| 51 |
* |
|---|
| 52 |
* @see sfWidgetForm |
|---|
| 53 |
*/ |
|---|
| 54 |
public function render($name, $value = null, $attributes = array(), $errors = array()) |
|---|
| 55 |
{ |
|---|
| 56 |
return parent::render($name, $this->getOption('always_render_empty') ? null : $value, $attributes, $errors); |
|---|
| 57 |
} |
|---|
| 58 |
} |
|---|
| 59 |
|
|---|