Holds field properties. More...
Public Member Functions | |
| get_label () | |
| Get the field label. | |
| get_form_type () | |
| Get the form type. | |
| set_form_type ($item) | |
| Set the form type. | |
| get_lookup_table () | |
| Get the lookup table. | |
| get_required () | |
| Is the field required? | |
| set_lookup_table ($item) | |
| Set the lookup table. | |
| render ($value, $options=array()) | |
| Render the field (view) | |
| render_form ($value='', $multiple=false) | |
| Render the field as a form control. | |
| get_lookup_sql () | |
| Returns a simple default SQL statement for lookup tables. | |
Public Member Functions inherited from Db_Model_Field | |
| __construct ($properties) | |
| Class constructor. | |
| is_primary_key () | |
| Check if the field is the primary key. | |
Public Member Functions inherited from Base | |
| __call ($function, $params) | |
| The 'magic' call method will get/set for us invoked when the interpreter can not find a method the user is asking for. | |
| set_parameters ($arguments) | |
| Set variables from an array to member fields requires $this->optional_arguments or $this->required_arguments to have been set by the subclass. | |
Protected Attributes | |
| $required = '' | |
| Required field. | |
Protected Attributes inherited from Db_Model_Field | |
| $db_type = '' | |
| Database column type (as defined in /lib/constants/db.php) | |
| $length = '' | |
| Length of field. | |
| $form_type = '' | |
| HTML form element type (as defined in /lib/constants/form.php) | |
| $lookup_table = '' | |
| Lookup table name. | |
| $lookup_model = '' | |
| Data model of lookup table (if applicable) | |
| $label = '' | |
| Field label. | |
| $description = '' | |
| Field description. | |
| $validation = array() | |
| Callback functions to check the field contents before submitting a form. | |
| $access = '' | |
| array: view => list of acces types | |
| $field_name = '' | |
| Field name. | |
| $is_primary_key = false | |
| Primary key field. | |
| $group = '' | |
| Group (for grouping fields) | |
Protected Attributes inherited from Base | |
| $optional_arguments = array() | |
| Array of options that can be set to variables. | |
| $required_arguments = array() | |
| Array of options that need to be set to variables. | |
Additional Inherited Members | |
Public Attributes inherited from Db_Model_Field | |
| $h2o_safe = true | |
| can be used in h2o | |
Holds field properties.
| Ui_model_field::get_lookup_sql | ( | ) |
Returns a simple default SQL statement for lookup tables.
Example: SELECT brand_id, brand_name FROM shop_brand ORDER BY brand_name
1.8.1.1