Collection of form elements
This class provides is an array of objects of the base_field class or derived classes. It contains functionality to : - adding objects - performing functions on all objects in the collection
| category | Form |
|---|---|
| package | Formaid |
| author | Dieter Adriaenssens |
| copyright | 2006-2013 Dieter Adriaenssens |
| license | GPL |
| link | http://formaid.sourceforge.net/ |
__construct() : void
add(object $obj, string $type, string $current_value, array $data, string $title, string $comment) : void
If the object is of the Formaid_FieldInputAbstract class, add it to the collection. If the object is not a class, create a new input field instance.
objectFormaid_FieldInputAbstract instance or name of new input field instance.
stringType of the input field.
stringInitial value.
arrayArray of name/ID pairs, values for the selection box.
stringTitle/caption that precedes this field.
stringComment that is shown after this field.
display() : void
| inherited_from | \Formaid_Collection::display() |
|---|---|
| inherited_from | \Formaid_Properties::display() |
getDisplayListSeparator() : string
| inherited_from | \Formaid_Collection::getDisplayListSeparator() |
|---|---|
| inherited_from | \Formaid_Properties::getDisplayListSeparator() |
stringString separating columnsgetDisplayPrefix() : string
| inherited_from | \Formaid_Collection::getDisplayPrefix() |
|---|---|
| inherited_from | \Formaid_Properties::getDisplayPrefix() |
stringPrefix string when displaying collection itemsgetDisplayString() : string
A displaystring is generated from all objects in the collection, all empty strings are removed and the remaining ones are chained together with the listSeparator.
| inherited_from | \Formaid_Collection::getDisplayString() |
|---|---|
| inherited_from | \Formaid_Properties::getDisplayString() |
stringgetDisplaySuffix() : string
| inherited_from | \Formaid_Collection::getDisplaySuffix() |
|---|---|
| inherited_from | \Formaid_Properties::getDisplaySuffix() |
stringSuffix string when displaying collection itemsgetName(string $name) : string
| inherited_from | \Formaid_Collection::getName() |
|---|---|
| inherited_from | \Formaid_Properties::getName() |
stringobject name
stringobject namegetNames() : array
| inherited_from | \Formaid_Collection::getNames() |
|---|---|
| inherited_from | \Formaid_Properties::getNames() |
arrayobject namesgetObject(string $name) : object
| inherited_from | \Formaid_Collection::getObject() |
|---|---|
| inherited_from | \Formaid_Properties::getObject() |
stringobject name
objectgetObjects() : array
| inherited_from | \Formaid_Collection::getObjects() |
|---|---|
| inherited_from | \Formaid_Properties::getObjects() |
arrayobjectsgetSqlInsertValues() : array
The returned array will be used to generate an INSERT statement
| todo | low : this method will be replaced by a DbValues composite class generating the same list |
|---|
arraygetSqlSelectValues() : array
The returned array will be used to generate a SELECT statement
| todo | low : this method will be replaced by a DbValues composite class generating the same list |
|---|
arraygetSqlUpdateValues() : array
The returned array will be used to generate an UPDATE statement
| todo | low : this method will be replaced by a DbValues composite class generating the same list |
|---|
arraygetUrlReturnParamValues() : array
arraygetValue(string $name) : string
| inherited_from | \Formaid_Properties::getValue() |
|---|
stringproperty name
stringreturns current value of propertyisEmpty(string $name) : bool
| inherited_from | \Formaid_Properties::isEmpty() |
|---|
stringproperty name
booltrue if emptyisNameEmpty(string $name) : bool
| inherited_from | \Formaid_Collection::isNameEmpty() |
|---|---|
| inherited_from | \Formaid_Properties::isNameEmpty() |
stringobject name
booltrue if emptynumItems() : int
| inherited_from | \Formaid_Collection::numItems() |
|---|---|
| inherited_from | \Formaid_Properties::numItems() |
intnumber of objects in collectionreadGetValues() : void
Reads the values in the $_GET array of all objects in the collection.
readPageRequestVariables() : void
Reads the webpage submitted values of all objects in the collection.
readPostValues() : void
Reads the values in the $_POST array of all objects in the collection.
readSqlValues(array $sql_row) : void
Reads the values from an sql row (array) of all objects in the collection.
arrayrow from sql_result
remove(string $name) : void
| inherited_from | \Formaid_Collection::remove() |
|---|---|
| inherited_from | \Formaid_Properties::remove() |
stringobject name
resetAll() : void
| inherited_from | \Formaid_Properties::resetAll() |
|---|
resetValue(string $name) : void
| inherited_from | \Formaid_Properties::resetValue() |
|---|
stringproperty name
setDefault(string $name, string $value) : void
| inherited_from | \Formaid_Properties::setDefault() |
|---|
stringproperty name
stringnew default value
setDisplayAffixes(string $prefix, string $suffix) : void
| inherited_from | \Formaid_Collection::setDisplayAffixes() |
|---|---|
| inherited_from | \Formaid_Properties::setDisplayAffixes() |
stringprefix string when displaying collection items
stringsuffix string when displaying collection items
setDisplayListSeparator(string $separator) : void
| inherited_from | \Formaid_Collection::setDisplayListSeparator() |
|---|---|
| inherited_from | \Formaid_Properties::setDisplayListSeparator() |
stringstring separating columns
setDisplayPrefix(string $prefix) : void
| inherited_from | \Formaid_Collection::setDisplayPrefix() |
|---|---|
| inherited_from | \Formaid_Properties::setDisplayPrefix() |
stringprefix string when displaying collection items
setDisplaySuffix(string $suffix) : void
| inherited_from | \Formaid_Collection::setDisplaySuffix() |
|---|---|
| inherited_from | \Formaid_Properties::setDisplaySuffix() |
stringsuffix string when displaying collection items
setName(string $name, string $new_name) : void
| inherited_from | \Formaid_Collection::setName() |
|---|---|
| inherited_from | \Formaid_Properties::setName() |
stringobject name
stringnew name
setPropertyValue(string $name, string $value) : void
stringproperty name
stringproperty value
setValue(string $name, string $new_value) : void
| inherited_from | \Formaid_Properties::setValue() |
|---|
stringproperty name
stringnew value
show() : void
The show method of every object is called. These functions print the object (name, value, ...) to stdout.
| inherited_from | \Formaid_Collection::show() |
|---|---|
| inherited_from | \Formaid_Properties::show() |
addDisplayAffixes(string $displayString) : string
The pre- and suffix should only be displayed when at least one item is displayed.
| inherited_from | \Formaid_Collection::addDisplayAffixes() |
|---|---|
| inherited_from | \Formaid_Properties::addDisplayAffixes() |
stringString with collection items to be displayed
stringString with added affixescallbackDisplayString(object $object) : string
It calls the getDisplayString() method of the instance
| static | |
|---|---|
| inherited_from | \Formaid_Collection::callbackDisplayString() |
| inherited_from | \Formaid_Properties::callbackDisplayString() |
objectInstance to apply the method to
stringDisplaystring of object$collection : array
| access | protected |
|---|---|
| inherited_from | \Formaid_Collection::$$collection |
| inherited_from | \Formaid_Properties::$$collection |
$_displayListSeparator : string
| access | private |
|---|---|
| inherited_from | \Formaid_Collection::$$_displayListSeparator |
| inherited_from | \Formaid_Properties::$$_displayListSeparator |
$_displayPrefix : string
| access | private |
|---|---|
| inherited_from | \Formaid_Collection::$$_displayPrefix |
| inherited_from | \Formaid_Properties::$$_displayPrefix |
$_displaySuffix : string
| access | private |
|---|---|
| inherited_from | \Formaid_Collection::$$_displaySuffix |
| inherited_from | \Formaid_Properties::$$_displaySuffix |