FreenetIS
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Form_Dropdown Class Reference
Inheritance diagram for Form_Dropdown:
Form_Input

Public Member Functions

 __get ($key)
 Returns form attributes.
 html_element ()
 Returns the form input HTML.
 add_button ($controller=NULL, $method= 'add', $args= '')
 Add button for adding object to drobbox.
 html ()
 Runs validation and returns the element HTML.
- Public Member Functions inherited from Form_Input
 __construct ($name)
 Sets the input element name.
 __call ($method, $args)
 Sets form attributes, or return rules.
 matches ($input)
 Sets a form element that this element must match the value of.
 callback ($callback)
 Sets a callback method as a rule for this input.
 name ($val=NULL)
 Sets name.
 label ($val=NULL)
 Sets or returns the input label.
 help ($val=NULL)
 Sets help.
 script ($type, $val=NULL)
 Sets script.
 message ($val=NULL)
 Set or return the error message.
 add_error ($key, $val)
 Add an error to the input.
 error_messages ($func=NULL, $message=NULL)
 Set or return the error messages.
 validate ()
 Validate this input based on the set rules.

Protected Member Functions

 load_value ()
 Load the value of the input, if form data is present.
- Protected Member Functions inherited from Form_Input
 add_rules (array $rules, $action)
 Replace, remove, or append rules.
 input_value ()
 Get the global input value.
 rule_gps ()
 Check if value is GPS coordinate if it is not empty.
 rule_preg_regex ()
 Check if value is pregex if it is not empty.
 rule_required ()
 Validate required.
 rule_required_with_zero ()
 Validate required that works for zero number.
 rule_length ($min, $max=NULL)
 Validate length.

Protected Attributes

 $data
 $protec = array('type')
- Protected Attributes inherited from Form_Input
 $data
 $protect = array()
 $rules = array()
 $matches = array()
 $callbacks = array()
 $is_valid
 $errors = array()
 $error_messages = array()

Additional Inherited Members

- Public Attributes inherited from Form_Input
 $method

Member Function Documentation

Form_Dropdown::__get (   $key)

Returns form attributes.

Parameters
stringattribute name
Returns
string

Reimplemented from Form_Input.

Form_Dropdown::add_button (   $controller = NULL,
  $method = 'add',
  $args = '' 
)

Add button for adding object to drobbox.

Content of dropdown is automatically update after adding by AJAX.

Author
Ondřej Fibich, Michal Kliment
Parameters
string$controllerController to add
string$methodMethod of controller [optional]
string$argsOther arguments of controller [optional]
Returns
Form_Dropdown
Form_Dropdown::html ( )

Runs validation and returns the element HTML.

Returns
string

Reimplemented from Form_Input.

Form_Dropdown::html_element ( )

Returns the form input HTML.

Returns
string

Reimplemented from Form_Input.

Form_Dropdown::load_value ( )
protected

Load the value of the input, if form data is present.

Returns
void

Reimplemented from Form_Input.

Member Data Documentation

Form_Dropdown::$data
protected
Initial value:
array
(
'type' => 'dropdown',
'class' => 'dropdown',
'name' => '',
)

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