Lançado Adianti Framework 7.6!
Clique aqui para saber mais
menu

Adianti Solutions

API

Adianti, Framework, PHP, MVC, Active record, Front controller, IDE, RAD, Web, multiplataforma, geração de código, desenvolvimento rápido, relatórios, formulários, listagens, datagrids, gráficos, banco de dados, padrões de projeto, design patterns API do Adianti Framework.
API Docs
code
Selecione a classe

Class TForm

Description

Implements interfaces:

Wrapper class to deal with forms

Located in /widget/form/TForm.php (line 25)


	
			
Direct descendents
Class Description
TQuickForm Create quick forms for input data with a standard container for elements
Variable Summary
mixed $children
mixed $element
mixed $fields
mixed $js_function
mixed $name
Method Summary
static getFormByName ($name)
static sendData ($form_name, $object, [$aggregate = FALSE], [$fireEvents = TRUE], [$timeout = 0])
__construct ([$name = 'my_form'])
add ($object)
addField ($field)
clear ([$keepDefaults = FALSE])
delField ($field)
getData ([$class = 'StdClass'])
getField ($name)
getName ()
getValues ([$class = 'StdClass'], [$withOptions = false])
pack ($object,)
setData ($object)
setEditable ($bool)
setFields ($fields)
setName ($name)
setProperty ($name, $value, [$replace = TRUE])
setTagName ($name)
show ()
silentField ($name)
unsetProperty ($name)
__set ($name, $value)
Variables
mixed $children (line 29)
  • access: protected
mixed $element (line 31)
  • access: protected
mixed $fields (line 27)
  • access: protected

Redefined in descendants as:
mixed $js_function (line 30)
  • access: protected
mixed $name (line 28)
  • access: protected

Redefined in descendants as:
mixed $silent_fields (line 32)
  • access: protected
Methods
static getFormByName (line 130)

Returns the form object by its name

  • access: public
static getFormByName ($name)
  • $name
static sendData (line 162)

Send data for a form located in the parent window

  • access: public
static sendData ($form_name, $object, [$aggregate = FALSE], [$fireEvents = TRUE], [$timeout = 0])
  • $form_name: Form Name
  • $object: An Object containing the form data
  • $aggregate
  • $fireEvents
  • $timeout
Constructor __construct (line 39)

Class Constructor

  • access: public
__construct ([$name = 'my_form'])
  • $name: Form Name

Redefined in descendants as:
add (line 446)

Add a container to the form (usually a table or panel)

  • access: public
add ($object)
  • $object: Any Object that implements the show() method
addField (line 213)

Add a Form Field

  • access: public
addField ($field)
  • $field: Object

Implementation of:
AdiantiFormInterface::addField()
clear (line 306)

clear the form Data

  • access: public
clear ([$keepDefaults = FALSE])
  • $keepDefaults

Implementation of:
AdiantiFormInterface::clear()
delField (line 237)

Remove a form field

  • access: public
delField ($field)
  • $field: Object

Implementation of:
AdiantiFormInterface::delField()
delFields (line 254)

Remove all form fields

  • access: public
delFields ()
getChild (line 466)

Returns the child object

  • access: public
getChild ()
getData (line 344)

Returns the form POST data as an object

  • access: public
getData ([$class = 'StdClass'])
  • $class: A string containing the class for the returning object

Implementation of:
AdiantiFormInterface::getData()
getField (line 286)

Returns a form field by its name

  • return: Field object
  • access: public
getField ($name)
  • $name: A string containing the field's name

Implementation of:
AdiantiFormInterface::getField()
getFields (line 298)

Returns an array with the form fields

  • return: of form fields
  • access: public
getFields ()

Implementation of:
AdiantiFormInterface::getFields()
getName (line 152)

Returns the form name

  • access: public
getName ()

Implementation of:
AdiantiFormInterface::getName()
getValues (line 369)

Returns the form start values as an object

  • access: public
getValues ([$class = 'StdClass'], [$withOptions = false])
  • $class: A string containing the class for the returning object
  • $withOptions
pack (line 458)

Pack a container to the form (usually a table or panel)

  • access: public
pack ($object,)
  • $object,: ...Any Object that implements the show() method
setData (line 323)

Define the data of the form

  • access: public
setData ($object)
  • $object: An Active Record object

Implementation of:
AdiantiFormInterface::setData()
setEditable (line 198)

Define if the form will be editable

  • access: public
setEditable ($bool)
  • $bool: A Boolean
setFields (line 263)

Define wich are the form fields

  • access: public
setFields ($fields)
  • $fields: An array containing a collection of TField objects

Implementation of:
AdiantiFormInterface::setFields()
setName (line 142)

Define the form name

  • access: public
setName ($name)
  • $name: A string containing the form name

Implementation of:
AdiantiFormInterface::setName()
setProperty (line 96)

Define a form property

  • access: public
setProperty ($name, $value, [$replace = TRUE])
  • $name: Property Name
  • $value: Property Value
  • $replace
setTagName (line 53)

Change tag name

  • access: public
setTagName ($name)
  • $name
show (line 474)

Shows the form at the screen

  • access: public
show ()

Implementation of:
AdiantiFormInterface::show()

Redefined in descendants as:
silentField (line 86)

Silent field

  • access: public
silentField ($name)
  • $name
unsetProperty (line 122)

Unset form property

  • access: public
unsetProperty ($name)
  • $name
validate (line 416)

Validate form

  • access: public
validate ()

Implementation of:
AdiantiFormInterface::validate()
__set (line 63)

Intercepts whenever someones assign a new property's value

  • access: public
__set ($name, $value)
  • $name: Property Name
  • $value: Property Value

Redefined in descendants as: