|
Revision 30762, 1.6 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 sfWidgetFormInput extends sfWidgetForm |
|---|
| 20 |
{ |
|---|
| 21 |
|
|---|
| 22 |
* Constructor. |
|---|
| 23 |
* |
|---|
| 24 |
* Available options: |
|---|
| 25 |
* |
|---|
| 26 |
* * type: The widget type |
|---|
| 27 |
* |
|---|
| 28 |
* @param array $options An array of options |
|---|
| 29 |
* @param array $attributes An array of default HTML attributes |
|---|
| 30 |
* |
|---|
| 31 |
* @see sfWidgetForm |
|---|
| 32 |
*/ |
|---|
| 33 |
protected function configure($options = array(), $attributes = array()) |
|---|
| 34 |
{ |
|---|
| 35 |
$this->addRequiredOption('type'); |
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
$this->setOption('type', 'text'); |
|---|
| 39 |
} |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
* Renders the widget. |
|---|
| 43 |
* |
|---|
| 44 |
* @param string $name The element name |
|---|
| 45 |
* @param string $value The value displayed in this widget |
|---|
| 46 |
* @param array $attributes An array of HTML attributes to be merged with the default HTML attributes |
|---|
| 47 |
* @param array $errors An array of errors for the field |
|---|
| 48 |
* |
|---|
| 49 |
* @return string An HTML tag string |
|---|
| 50 |
* |
|---|
| 51 |
* @see sfWidgetForm |
|---|
| 52 |
*/ |
|---|
| 53 |
public function render($name, $value = null, $attributes = array(), $errors = array()) |
|---|
| 54 |
{ |
|---|
| 55 |
return $this->renderTag('input', array_merge(array('type' => $this->getOption('type'), 'name' => $name, 'value' => $value), $attributes)); |
|---|
| 56 |
} |
|---|
| 57 |
} |
|---|
| 58 |
|
|---|