Class

AbstractFormField

Abstract Package: builder Author: Régis Viarre <crowkait@phpboost.com> Desc: Abstract class that proposes a default implementation for the FormField interface. Located at builder/form/field/AbstractFormField.class.php
AbstractFormField implements FormField
Methods summary
protected
# __construct( string $id, string $label, mixed $value, array $field_options = array(), array $constraints = array() )
public string
# get_id( )
public
# set_id( string $id )
public
public
# set_form_id( string $form_id )
public
# set_fieldset_id( mixed $fieldset_id )
public string
# get_label( )

Returns the label

public
# set_label( string $label )

Sets the label

public string
# get_description( )

Returns the description

public
# set_description( string $description )

Sets the description

public mixed
# get_value( )
public
# set_value( string $value )
public true
# is_required( )
public
# set_required( boolean $required )
public boolean
# validate( )
public
# get_validation_error_message( )
public
# set_validation_error_message( string $error_message )
public
public string
# get_html_id( )
public
# add_constraint( FormFieldConstraint $constraint )
public
# add_form_constraint( FormConstraint $constraint )
public boolean
# has_constraints( )
public string
# get_js_validations( )
public
public
# add_event( mixed $event, mixed $handler )
protected
# compute_options( array & $field_options )
protected
protected
protected
# set_css_class( mixed $css_class )
protected
protected
# set_css_field_class( mixed $css_field_class )
protected
protected
# set_css_form_field_class( mixed $css_form_field_class )
public boolean
# is_disabled( )
public
# disable( )
public
# enable( )
protected
# set_disabled( mixed $disabled )
public
public
# set_readonly( mixed $readonly )
public
public
# set_hidden( mixed $hidden )
public
public
# set_pattern( mixed $pattern )
public
public
# set_placeholder( mixed $placeholder )
public
# set_template( Template $template )
protected Template
abstract protected Template
protected
Methods inherited from HTMLElement
display()
Properties summary
protected string $id ''
#
protected string $label ''
#
protected string $description ''
#
protected string $value null
#
protected boolean $disabled false
#
protected boolean $hidden false
#
protected boolean $readonly false
#
protected string $css_class ''
#
protected string $css_field_class ''
#
protected string $css_form_field_class ''
#
protected string $required false
#
protected string $pattern ''
#
protected string $placeholder ''
#
protected string $validation_error_message ''
#
protected FormFieldConstraint[] $constraints array()
#
protected FormConstraint[] $form_constraints array()
#
protected Template $template null
#
protected string[string] $events array()
#