Jet\Form_Definition_SubForm

A class represents a sub-form definition 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
    Name of the property that represents the sub-formula
  • &$property
    References to a property representing a sub-formula
  • $definition_data
    Definition parameters in raw form.
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 that will serve as the root name of the fields of the included subform.
public getCreator(
) : ?callable
Returns the eventual 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 a sub-form by including its fields in the list of fields of the parent/generated form.
Previous chapter
Jet\Form_Definition_Field
Next chapter
Jet\Form_Definition_SubForms