Jet\Form_Renderer_Field

The form element renderer class, which inherits from the Jet\Form_Renderer_Single class.

The renderer creates and holds instances of the other renderers of the form field elements (row, label, container, input element, help and error message).

Overview of methods

Method Meaning of
public __construct(
Form_Field $field
)
The only parameter is the instance of the form field to which the renderer belongs.
public getField(
) : Form_Field
Returns the instance of the form field to which the renderer belongs.
public getViewDir(
) : string
Returns the view directory for the given form field and all its elements(!). If the renderer does not have a custom value set, then it takes the value from the renderer of the form the field belongs to.
public setViewDir(
string $view_dir
) : string
For a given form field (and all its elements) it is possible to set an extra directory path with view scripts. See getViewDir.
public row(
) : Form_Renderer_Field_Row
Creates and returns an instance of the row renderer.
public container(
) : Form_Renderer_Field_Container
Creates and returns a container renderer instance.
public error(
) : Form_Renderer_Field_Error
Creates and returns an instance of the error message renderer.
public help(
) : Form_Renderer_Field_Help
Creates and returns a help renderer instance.
public label(
) : Form_Renderer_Field_Label
Creates and returns a label renderer instance.
public input(
) : Form_Renderer_Field_Input
Creates and returns a renderer instance of the input element.
Previous chapter
Jet\Form_Renderer_Form_Message
Next chapter
Jet\Form_Renderer_Field_Container