Orion PHP  0.11.12
The PHP5.3 framework
Orion\Core\Form\Field Class Reference
+ Inheritance diagram for Orion\Core\Form\Field:

List of all members.

Public Member Functions

 toHtml ($XHTML=true)
 getLabel ()
 getType ()
 getBinding ()
 getName ()
 getValue ()
 setValue ($val)
 setVisibility ($bool)
 isEmptyValue ($value)
 isMultipart ()
 isRequired ()
 isVisible ()
 __toString ()

Protected Attributes

 $visible = true
 $multipart = false
 $value
 $type
 $bind
 $label = 'OrionField'
 $required = false

Detailed Description

Base form field class.

Contrary to OrionModelFields, these fields are used only for form creation. Never for DB model handling. Extend this abstract class when creating a new form field class. (Customfield extends Field). Be sure to specify at least $bind and $type attributes

Definition at line 11 of file field.php.


Member Function Documentation

Orion\Core\Form\Field::__toString ( )

Definition at line 154 of file field.php.

Orion\Core\Form\Field::getBinding ( )

Retreive field's binding (field ID)

Returns:
string

Definition at line 79 of file field.php.

Orion\Core\Form\Field::getLabel ( )

Retreive field's label

Returns:
string

Definition at line 60 of file field.php.

Orion\Core\Form\Field::getName ( )

Same as getBinding(), just a more common name. Retreive field's binding (field ID)

Returns:
string

Definition at line 88 of file field.php.

Orion\Core\Form\Field::getType ( )

Retreive field's type

Returns:
string

Definition at line 69 of file field.php.

Orion\Core\Form\Field::getValue ( )

Retreive field's value

Returns:
string

Definition at line 97 of file field.php.

Orion\Core\Form\Field::isEmptyValue ( value)

Check if the field's value is empty (override for specific cases)

Returns:
boolean

Definition at line 122 of file field.php.

Orion\Core\Form\Field::isMultipart ( )

Check if the field needs a multipart form type

Returns:
boolean

Definition at line 131 of file field.php.

Orion\Core\Form\Field::isRequired ( )

Check if the field is required

Returns:
boolean

Definition at line 140 of file field.php.

Orion\Core\Form\Field::isVisible ( )

Check if the field is visible in form creation

Returns:
boolean

Definition at line 149 of file field.php.

Orion\Core\Form\Field::setValue ( val)

Set field's value

Definition at line 105 of file field.php.

Orion\Core\Form\Field::setVisibility ( bool)

Set field's form visibility

Definition at line 113 of file field.php.

Orion\Core\Form\Field::toHtml ( XHTML = true) [abstract]

Override this function to define a specific (x)HTML form field to use during model-to-form translation.

Parameters:
boolean$XHTML
Returns:
string

Reimplemented in Orion\Core\Form\Message, Orion\Core\Form\Hidden, Orion\Core\Form\Submit, and Orion\Core\Form\Cancel.


Member Data Documentation

Orion::Core::Form\Field::$bind [protected]

Definition at line 44 of file field.php.

Orion::Core::Form\Field::$label = 'OrionField' [protected]

Definition at line 49 of file field.php.

Orion::Core::Form\Field::$multipart = false [protected]

Definition at line 29 of file field.php.

Orion::Core::Form\Field::$required = false [protected]

Definition at line 54 of file field.php.

Orion::Core::Form\Field::$type [protected]

Definition at line 39 of file field.php.

Orion::Core::Form\Field::$value [protected]

Definition at line 34 of file field.php.

Orion::Core::Form\Field::$visible = true [protected]

Definition at line 24 of file field.php.


The documentation for this class was generated from the following file: