Jet\Form_Definition_Field
A class represents the definition of a form field within the form-to-class mapping.
Overview of methods
Method | Meaning of |
---|---|
public __construct( object $context_object, string $property_name, mixed& $property, array $definition_data ) |
Parameters:
|
public getContextObject( ) : object |
Returns an instance of the object to which the form will be mapped. |
public getPropertyName( ) : string |
The name of the property to which the form field will be linked. |
public getFieldName( ) : string |
Returns the name of the form field. |
public getType( ) : string|bool |
Returns the form field type (type code, not the form field class name) |
public setType( string|bool $type ) : void |
Sets the form field type (type code, not the form field class name) |
public getCreator( ) : ?callable |
Returns a creator. |
public setCreator( null|callable|array $creator ) : void |
Sets the creator. |
public getDefaultValueGetterName( ) : string |
Returns the name of the method used to retrieve the default value of the form field. |
public getSetterName( bool $get_defined=false ) : string |
Returns the name of the setter method for setting the captured value to the connected object. |
public setSetterName( string $setter_name ) : void |
Sets the name of the setter method for setting the captured value to the connected object. |
public getIsRequired( ) : bool |
Induces whether or not the field will be marked as mandatory. |
public getLabel( ) : string |
Returns the field label. |
public setLabel( string $label ) : void |
Sets the field label. |
public getHelpText( ) : string |
Returns the help text of the field. |
public setHelpText( string $help_text ) : void |
Sets the help text of the field. |
public getHelpData( ) : array |
Returns the form field help data. |
public setHelpData( array $help_data ) : void |
Sets the form field help data. |
public getErrorMessages( ) : array |
Returns form field error messages. |
public setErrorMessages( array $messages ) : void |
Sets the form field error messages. |
public getOtherOption( string $option, mixed $default_value='' ) : mixed |
Returns the value of a parameter that is not part of the standard definition (it is bound to a specific field type). |
public createFormField( array& $form_fields ) : void |
By definition, it creates a form field (or multiple fields) and passes them to a list that is passed by reference as a parameter. |