sfWidgetFormDateTime represents a datetime widget.
Method Summary
-
configure($options, $attributes)
Configures the current widget.
-
array
getAttributesFor($type, $attributes)
Returns an array of HTML attributes for the given type.
-
sfWidgetForm
getDateWidget($attributes)
Returns the date widget.
-
array
getOptionsFor($type)
Returns an array of options for the given type.
-
sfWidgetForm
getTimeWidget($attributes)
Returns the time widget.
-
string
render($value, $attributes, $errors)
@param string $name The element name
fixFormId , generateId , generateTwoCharsRange , getIdFormat , isHidden , needsMultipartForm , renderContentTag , renderTag , setHidden , setIdFormat , __construct
Methods inherited from sfWidget
addOption , addRequiredOption , attributesToHtml , attributesToHtmlCallback , configure , escapeOnce , fixDoubleEscape , getAttribute , getAttributes , getCharset , getOption , getOptions , getRequiredOptions , hasOption , isXhtml , render , renderContentTag , renderTag , setAttribute , setAttributes , setCharset , setOption , setOptions , setXhtml , __construct
Method Details
-
configure ($options, $attributes)
Browse code
| $options |
An array of options |
| $attributes |
An array of default HTML attributes |
Configures the current widget.
The attributes are passed to both the date and the time widget. If you want to pass HTML attributes to one of the two widget, pass an
attributes option to the date or time option (see below). Available options: * date: Options for the date widget (see sfWidgetFormDate)
* time: Options for the time widget (see sfWidgetFormTime)
* with_time: Whether to include time (true by default)
* format: The format string for the date and the time widget (default to %date% %time%)
-
(array) getAttributesFor ($type, $attributes)
Browse code
| $type |
The type (date or time) |
| $attributes |
An array of attributes |
Returns an array of HTML attributes for the given type.
returns An array of HTML attributes
-
(sfWidgetForm) getDateWidget ($attributes)
Browse code
| $attributes |
An array of attributes |
Returns the date widget.
returns A Widget representing the date
-
(array) getOptionsFor ($type)
Browse code
| $type |
The type (date or time) |
Returns an array of options for the given type.
returns An array of options
-
(sfWidgetForm) getTimeWidget ($attributes)
Browse code
| $attributes |
An array of attributes |
Returns the time widget.
returns A Widget representing the time
-
(string) render ($value, $attributes, $errors)
Browse code
| $value |
The date and time displayed in this widget |
| $attributes |
An array of HTML attributes to be merged with the default HTML attributes |
| $errors |
An array of errors for the field |
@param string $name The element name
returns An HTML tag string
|