TForm
in package
implements
AdiantiFormInterface
Wrapper class to deal with forms
Tags
Table of Contents
Interfaces
- AdiantiFormInterface
- Form Interface
Properties
- $children : mixed
- $element : mixed
- $fields : mixed
- $js_function : mixed
- $name : mixed
- $silent_fields : mixed
- $forms : mixed
Methods
- __construct() : mixed
- Class Constructor
- __set() : mixed
- Intercepts whenever someones assign a new property's value
- add() : mixed
- Add a container to the form (usually a table or panel)
- addField() : mixed
- Add a Form Field
- clear() : mixed
- clear the form Data
- delField() : mixed
- Remove a form field
- delFields() : mixed
- Remove all form fields
- getChild() : mixed
- Returns the child object
- getData() : mixed
- Returns the form POST data as an object
- getField() : The
- Returns a form field by its name
- getFields() : array<string|int, mixed>
- Returns an array with the form fields
- getFormByName() : mixed
- Returns the form object by its name
- getName() : mixed
- Returns the form name
- getValues() : mixed
- Returns the form start values as an object
- pack() : mixed
- Pack a container to the form (usually a table or panel)
- sendData() : mixed
- Send data for a form located in the parent window
- setData() : mixed
- Define the data of the form
- setEditable() : mixed
- Define if the form will be editable
- setFields() : mixed
- Define wich are the form fields
- setName() : mixed
- Define the form name
- setProperty() : mixed
- Define a form property
- setTagName() : mixed
- Change tag name
- show() : mixed
- Shows the form at the screen
- silentField() : mixed
- Silent field
- unsetProperty() : mixed
- Unset form property
- validate() : mixed
- Validate form
Properties
$children
protected
mixed
$children
$element
protected
mixed
$element
$fields
protected
mixed
$fields
$js_function
protected
mixed
$js_function
$name
protected
mixed
$name
$silent_fields
protected
mixed
$silent_fields
$forms
private
static mixed
$forms
Methods
__construct()
Class Constructor
public
__construct([ $name = 'my_form' ]) : mixed
Parameters
__set()
Intercepts whenever someones assign a new property's value
public
__set( $name, $value) : mixed
Parameters
add()
Add a container to the form (usually a table or panel)
public
add( $object[, mixed $is_field = false ]) : mixed
Parameters
addField()
Add a Form Field
public
addField(AdiantiWidgetInterface $field) : mixed
Parameters
- $field : AdiantiWidgetInterface
-
Object
clear()
clear the form Data
public
clear([mixed $keepDefaults = FALSE ]) : mixed
Parameters
- $keepDefaults : mixed = FALSE
delField()
Remove a form field
public
delField(AdiantiWidgetInterface $field) : mixed
Parameters
- $field : AdiantiWidgetInterface
-
Object
delFields()
Remove all form fields
public
delFields() : mixed
getChild()
Returns the child object
public
getChild() : mixed
getData()
Returns the form POST data as an object
public
getData([mixed $class = 'StdClass' ]) : mixed
Parameters
- $class : mixed = 'StdClass'
-
A string containing the class for the returning object
getField()
Returns a form field by its name
public
getField(mixed $name) : The
Parameters
- $name : mixed
-
A string containing the field's name
Return values
The —Field object
getFields()
Returns an array with the form fields
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —of form fields
getFormByName()
Returns the form object by its name
public
static getFormByName(mixed $name) : mixed
Parameters
- $name : mixed
getName()
Returns the form name
public
getName() : mixed
getValues()
Returns the form start values as an object
public
getValues([ $class = 'StdClass' ][, mixed $withOptions = false ]) : mixed
Parameters
pack()
Pack a container to the form (usually a table or panel)
public
pack() : mixed
sendData()
Send data for a form located in the parent window
public
static sendData( $form_name, $object[, mixed $aggregate = FALSE ][, mixed $fireEvents = TRUE ][, mixed $timeout = 0 ]) : mixed
Parameters
setData()
Define the data of the form
public
setData(mixed $object) : mixed
Parameters
- $object : mixed
-
An Active Record object
setEditable()
Define if the form will be editable
public
setEditable( $bool) : mixed
Parameters
setFields()
Define wich are the form fields
public
setFields(mixed $fields) : mixed
Parameters
- $fields : mixed
-
An array containing a collection of TField objects
setName()
Define the form name
public
setName(mixed $name) : mixed
Parameters
- $name : mixed
-
A string containing the form name
setProperty()
Define a form property
public
setProperty( $name, $value[, mixed $replace = TRUE ]) : mixed
Parameters
setTagName()
Change tag name
public
setTagName(mixed $name) : mixed
Parameters
- $name : mixed
show()
Shows the form at the screen
public
show() : mixed
silentField()
Silent field
public
silentField(mixed $name) : mixed
Parameters
- $name : mixed
unsetProperty()
Unset form property
public
unsetProperty(mixed $name) : mixed
Parameters
- $name : mixed
validate()
Validate form
public
validate() : mixed