Base field class.
Defines methods and attributes all fields should have (with several exceptions - see attribute description). Derive all fields from it. It also provides implementation of a few methods supposing the field contains text (not because all fields are text, but because most of them are textual and so they can use the default implementation).
Located in /DBLField.php (line 30)
Class | Description |
---|---|
DBLDateTimeField | Field used to display/edit date and/or time. |
DBLTextField | Class to edit a text field. |
DBLMemoField | DBLMemoField class is used to edit longer texts - notes, descriptions, etc. |
DBLBoolField | Boolean field represented by a checkbox widget. |
DBLConditionField | Can be used to add custom (arbitrary) condition(s) to the filter. |
DBLComboField | Combo field - selects one of N choices. |
DBLBitField | Field of several booleans (checkboxes). |
DBLFileField | Field for storing files (and also image files) |
DBLJSEditField | Textual field whose contents are edited in external javascript window. |
DBLLabelField | This is just a simple class. |
Specifies this is a lookup field (means DBLView has to sort by dbName_txt instead of dbName).
Constructor.
Accept value from the filter.
Take value from the filter and set the corresponding value(s) in the filter array. The filter array will then be passes to the addCondition method below. Please note, that this function may not actually refuse passed value.
Accept value from post.
Check value from post, do conversions and return which fields in the database should be set and to what.
Add condition(s) to the query according to the filter value.
This method 'sets the filter' for this field.
Check value (from post)
Checks whether value that we got from post is valid. If so, the function should return true. If not the function should add (textual, no HTML!) error message(s) to the $err array and return false.
This functionality is not contained directly in the acceptValue() method to allow (check value) code reuse by subclasses.
Format field for record detail.
Format field for record edit form.
Format field for the filter form.
Format field for record index.
Create javascript to check the field value before post.
The javascript code should check field value, display an error when something is wrong and return(false) (to prevent submitting the form).
Set title of the field.
Sets $titleTxt and $titleHTML properties from the arguments of the method. The only real use is that it automatically uses htmlspecialchars($titleTxt) when $titleHTML is empty.
Utility function - split value to the operator(s) and value(s).
DBLIB supports filtering by conditions (less than, greater, ...). Even by two conditions in one value (>=5<=10). This is a utility function which parses such filter values to operators and values.
op1 will be set to first operator, or to: - = When no operator is used and * value does not contain asterix or question mark. - wild When no operator is used and value contains asterix or question mark.
val1 will be set to the first value. op2 will be set to the second operator (or to an empty string when none are present). val2 will be set to the econd value (or to an empty string when none are present.)
Documentation generated on Mon, 6 Sep 2004 21:57:06 +0200 by phpDocumentor 1.2.3