Field of several booleans (checkboxes).
Meant mainly as a means of editting a bit field. But since the choices have their weight (which are bitwise ORed), it may be used to more complicated task than this.
In the edit form/filter, the field is represented by a set of checkboxes, which is presented in a (HTML) table.
In the index/detail, the field is represented by a list of values, which match set bits.
The value of the field may be stored in two ways. First one is a 32-bit integer. If you need to store more bits, DBLBitField can store value as a string. Four lowest bits of each letter are used to store value. To produce real strings, 64 (decimally) is added to each value. For the output to be real string, @ is interchanged with P (@+16). So P means 0, A is 1, B is 2, etc. If you use this storage style, please note that the choice values must also use this convention. This storage style has one disadvantage - you cannot filter by such values since DB engines do not understand it :-( Even when using nubmers, only SQL Queries are supported.
What is "Eliminate subvalues": What is a subvalue? Imagine you have provided following array as values: array(array(1,"Option1"), array(2,"Option2"), array(4,"Option4"), array(7,"All")). Then "options" are subvalues of "all". When "all" is selected, all options and the "all" text would be printed in the record index/detail. Which is not nice. So eliminateSubvalues feature is provided. With it turned on, only "all" will be printed. (Subvalues are detected automatically, which is nice for you, but the complexity of it is n^3 (n is number of values in the values array). So that's why this feature is not turned on by default.
Note on value passing: The weight of the value is stored directly in the form. This prevents problems when possible values are generated from a table and someone changes that table while user is editting the record. This, of course, allow user to submit any value. After the form is submitted the submitted weights are checked if theya are really in the values list. If the small performance penalty concerns you (or you don't want to fill list of values on submit), set the checkWeight property to false. (There is no better way to pass the weight - value descriptions may be same for several weights and I wanted to avoid addidng artifical unique key which would make it more complicated.)
Located in /DBLBitField.php (line 55)
DBLField | --DBLBitField
Inherited from DBLField
DBLField::$addAsterixes
DBLField::$allowEmpty
DBLField::$computed
DBLField::$dbName
DBLField::$default
DBLField::$detailAttributes
DBLField::$detailPostfix
DBLField::$detailPrefix
DBLField::$editAttributes
DBLField::$editPostfix
DBLField::$editPrefix
DBLField::$filterAttributes
DBLField::$filterPostfix
DBLField::$filterPrefix
DBLField::$indexAttributes
DBLField::$indexPostfix
DBLField::$indexPrefix
DBLField::$lookupField
DBLField::$name
DBLField::$needsMultipart
DBLField::$noOrderByTitle
DBLField::$readOnly
DBLField::$referenceURL
DBLField::$titleHTML
DBLField::$titleTxt
DBLField::$widgetAttributes
Constructor.
Format value read only
Internal function to list contents of the field in textual form.
Internal function - format table with choices.
Check whether value is a subvalue of another value
Do binary OR on weights expressed as strings.
Inherited From DBLField
DBLField::DBLField()
DBLField::acceptFilterValue()
DBLField::acceptValue()
DBLField::addCondition()
DBLField::checkValue()
DBLField::formatDetail()
DBLField::formatEdit()
DBLField::formatFilter()
DBLField::formatIndex()
DBLField::jsCheck()
DBLField::setTitle()
DBLField::splitValue()
Documentation generated on Mon, 6 Sep 2004 21:57:02 +0200 by phpDocumentor 1.2.3