A choice list based on an SQL statement.
Primitive class on which selection lists can be built from the results of an SQL query. This may be used to determine the choices that a user is permitted to select (e.g. dropdown list or radio buttons) or also to permit additional entries to be created.
Used in a 1:many relationship (i.e. a field in a table that is the primary key in another table)
Note that this class has no real way of displaying itself properly, so it would usually be inherited and the descendent class used.
Typical usage:
Located in /inc/formslib/dbchoicelist.php (line 48)
DBO | --DBChoiceList
Inherited from DBO
DBO::$DEBUG
DBO::$deletable
DBO::$dumpheader
DBO::$errorMessage
DBO::$fatal_sql
DBO::$fields
DBO::$id
DBO::$idfield
DBO::$idfieldreal
DBO::$ignoreId
DBO::$isValid
DBO::$namebase
DBO::$oob_errorMessage
DBO::$oob_status
DBO::$suppressValidation
DBO::$table
Construct the DBlist object.
Construct a new DBList object based on:
append a special field (such as "Create new:") to the choicelist
Keep a copy of the field so it can be added again later if necessary, and then use a private function to actually do the adding
Fill the object from the database using the already initialised members (->table etc).
prepend a special field (such as "Create new:") to the choicelist
Keep a copy of the field so it can be added again later if necessary, and then use a private function to actually do the adding
determine whih values are selected and return them
sets the current value of the field
(providing interface to Field object)
set which option in the selection list is the default option
synchronise with the database
This also creates the true value for this field if it is undefined
update the value of the list based on user data:
Clone the array field structure
private functions _append and _prepend that will actually add the field
to the field list after it has been properly constructed and saved for future reference
Construct an array suitable for storing the field and the values it takes for later reuse
add back in the extra fields that were appended/prepended to the
choicelist. Use this if they fields are lost due to a fill()
PHP5 clone method
PHP5 clone statement will perform only a shallow copy of the object. Any subobjects must also be cloned
Inherited From DBO
DBO::DBO()
DBO::display()
DBO::log()
DBO::setEditable()
DBO::setNamebase()
DBO::text_dump()
DBO::__clone()
Documentation generated on Tue, 06 Mar 2007 10:01:17 +0000 by phpDocumentor 1.3.0