-
(sfValidatorError) getError ()
Browse code
Returns the error for this field.
returns A sfValidatorError instance
-
(sfFormField) getParent ()
Browse code
Returns the parent form field.
returns A sfFormField instance
-
(Exception) getToStringException ()
Browse code
Gets the exception if one was thrown in the __toString() method.
This is a hack needed because PHP does not allow to throw exceptions in __toString() magic method.
-
Returns the widget value.
returns The widget value
-
(sfWidget) getWidget ()
Browse code
Returns the wrapped widget.
returns A sfWidget instance
-
Returns true is the field has an error.
returns true if the field has some errors, false otherwise
-
(boolean) hasToStringException ()
Browse code
Returns true if a form thrown an exception in the __toString() method
This is a hack needed because PHP does not allow to throw exceptions in __toString() magic method.
-
Returns true if the widget is hidden.
returns true if the widget is hidden, false otherwise
-
(string) render ($attributes)
Browse code
| $attributes |
An array of HTML attributes |
Renders the form field.
returns The rendered widget
-
(string) renderError ()
Browse code
Returns a formatted error list.
The formatted list will use the parent widget schema formatter.
returns The formatted error list
-
(string) renderLabel ($label, $attributes)
Browse code
| $label |
The label name (not null to override the current value) |
| $attributes |
Optional html attributes |
Returns the label tag.
returns The label tag
-
(string) renderLabelName ()
Browse code
Returns the label name given a widget name.
returns The label name
-
(string) renderRow ($attributes, $label, $help)
Browse code
| $attributes |
An array of HTML attributes to merge with the current attributes |
| $label |
The label name (not null to override the current value) |
| $help |
The help text (not null to override the current value) |
Returns a formatted row.
The formatted row will use the parent widget schema formatter.
The formatted row contains the label, the field, the error and
the help message.
returns The formatted row
-
setToStringException ($e)
Browse code
| $e |
The exception thrown by __toString() |
Sets an exception thrown by the __toString() method.
This is a hack needed because PHP does not allow to throw exceptions in __toString() magic method.
-
__construct ($widget, $parent, $name, $value, $error)
Browse code
| $widget |
A sfWidget instance |
| $parent |
The sfFormField parent instance (null for the root widget) |
| $name |
The field name |
| $value |
The field value |
| $error |
A sfValidatorError instance |
Constructor.
-
(string) __toString ()
Browse code
Returns the string representation of this form field.
returns The rendered field