Jet\Form_Definition_SubForms

The class represents the definition of sub-forms within the form-to-class mapping.

Method Meaning of
public __construct(
object $context_object,
string $property_name,
mixed& $property,
array $definition_data
)
Parameters:
  • $context_object
    Instance of the object to which the form will be linked.
  • $property_name
    The name of the property that represents the sub-forms.
  • &$property
    References to a property representing sub-formulas.
  • $definition_data
    Definition parameters in raw form.
public getContextObject(
) : object
Returns the 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 that will serve as the root name of the fields of the included sub-forms.
public getCreator(
) : ?callable
Returns a possible sub-form creator.
public setCreator(
null|callable|array $creator
) : void
Sets the sub-form creator.
public createFormFields(
string $parent_name,
array& $form_fields
) : void
Generates sub-forms and includes their fields in the field list of the parent/generated form.
Previous chapter
Jet\Form_Definition_SubForm
Next chapter
Creating a custom form field type