Jet\Form_Renderer_Field_Container
A Renderer designed to display the start and end of a form element container. Thus, it is a pair renderer inheriting from the Jet\Form_Renderer_Pair class.
Default view scripts
The name of the default view script is field/container/start for the beginning of the container and field/container/end for the end.
The value in the system configuration can be accessed as follows:
$view_script_start = SysConf_Jet_Form_DefaultViews::get($field->getType(), 'container_start');
$view_script_end = SysConf_Jet_Form_DefaultViews::get($field->getType(), 'container_end');
SysConf_Jet_Form_DefaultViews::set( $field_type , 'container_start', 'my-view-script-start');
SysConf_Jet_Form_DefaultViews::set( $field_type , 'container_end', 'my-view-script-end');
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 getViewDir method. |