Jet\Form_Renderer_Field_Label
Renderer designed to display the form element label. 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/label.
The value in the system configuration can be accessed as follows:
$view_script_start = SysConf_Jet_Form_DefaultViews::get($field->getType(), 'label');
SysConf_Jet_Form_DefaultViews::set( $field_type , 'label', '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 getWidth( ) : array|null |
Returns the width settings of the elements. If the element does not have its own settings, it takes the form renderer settings. |
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. |