Jet\Form_Renderer_Field_Error

Renderer designed to display the error message of the form element. It is an unpaired renderer inheriting from the Jet\Form_Renderer_Single class.

Default view scripts

The name of the default view script is field/error.

The value in the system configuration can be accessed as follows:

$view_script_start SysConf_Jet_Form_DefaultViews::get($field->getType(), 'error'); SysConf_Jet_Form_DefaultViews::set$field_type 'error''my-view-script');

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 element. If the renderer does not have its own value set, then it takes the value from the parent form field renderer Jet\Form_Renderer_Field, which may have its own value, or it may take the value from the form renderer Jet\Form_Renderer_Form.
public setViewDir(
string $view_dir
) : string
It is possible to set an extra directory path with view scripts for the element. See the getViewDir method.
Previous chapter
Jet\Form_Renderer_Field_Container
Next chapter
Jet\Form_Renderer_Field_Label