atkMultiSelectAttribute atkMultiSelectAttribute(
string
$name, array
$optionArray, [array
$valueArray = ""], [int
$cols = ""], [int
$flags = 0], [int
$size = ""]
)
|
|
Constructor
Parameters:
|
string |
$name: |
Name of the attribute |
|
array |
$optionArray: |
Array with options |
|
array |
$valueArray: |
Array with values. If you don't use this parameter, values are assumed to be the same as the options. |
|
int |
$cols: |
Number of columns |
|
int |
$flags: |
Flags for this attribute |
|
int |
$size: |
Size of the attribute. |
mixed db2value(
array
$rec
)
|
|
Converts a database value to an internal value.
Parameters:
|
array |
$rec: |
The database record that holds this attribute's value |
API Tags:
| Return: | The internal value |
Redefinition of:
- atkAttribute::db2value()
- Converts a database value to an internal value.
Redefined in descendants as:
Return the database field type of the attribute.
API Tags:
| Return: | The 'text' type of the database field for this attribute. |
Redefinition of:
- atkListAttribute::dbFieldType()
- Return the database field type of the attribute.
Redefined in descendants as:
String display(
array
$record, [String
$mode = ""]
)
|
|
Returns a displayable string for this value, to be used in HTML pages.
Parameters:
|
array |
$record: |
The record that holds the value for this attribute |
|
String |
$mode: |
The display mode ("view" for viewpages, or "list" for displaying in recordlists, "edit" for displaying in editscreens, "add" for displaying in add screens. "csv" for csv files. Applications can use additional modes. |
API Tags:
Redefinition of:
- atkListAttribute::display()
- Display's text version of Record
piece edit(
[array
$record = ""], [String
$fieldprefix = ""], [String
$mode = ""]
)
|
|
Returns a piece of html code that can be used in a form to edit this attribute's value.
Parameters:
|
array |
$record: |
Array with fields |
|
String |
$fieldprefix: |
The fieldprefix to put in front of the name of any html form element for this attribute. |
|
String |
$mode: |
The mode we're in ('add' or 'edit') |
API Tags:
| Return: | of html code with radioboxes |
Redefinition of:
- atkListAttribute::edit()
- Returns a piece of html code that can be used in a form to edit this attribute's value.
string getSearchCondition(
&$query, string
$table, mixed
$value, string
$searchmode, atkquery
$query
)
|
|
Parameters:
|
atkquery |
$query: |
|
|
string |
$table: |
|
|
mixed |
$value: |
|
|
string |
$searchmode: |
|
|
|
&$query: |
|
API Tags:
| Return: | condition to use in a where clause |
Information Tags:
| Todo: | code below can't possibly work. really needs to be fixed. |
Redefinition of:
- atkListAttribute::getSearchCondition()
- Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
Redefined in descendants as:
Retrieve the list of searchmodes supported by the attribute.
API Tags:
| Return: | List of supported searchmodes |
Redefinition of:
- atkListAttribute::getSearchModes()
- Retrieve the list of searchmodes supported by the attribute.
Redefined in descendants as:
String hide(
[array
$record = ""], [String
$fieldprefix = ""]
)
|
|
Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
Parameters:
|
array |
$record: |
The record that holds the value for this attribute |
|
String |
$fieldprefix: |
The fieldprefix to put in front of the name of any html form element for this attribute. |
API Tags:
| Return: | A piece of htmlcode with hidden form elements that post this attribute's value without showing it. |
Redefinition of:
- atkAttribute::hide()
- Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
Redefined in descendants as:
-
atkFlagAttribute::hide()
: Returns a piece of html code for hiding this attribute in an HTML form, while still posting its value. (<input type="hidden">)
boolean isEmpty(
array
$record
)
|
|
Check if a record has an empty value for this attribute.
Parameters:
|
array |
$record: |
The record that holds this attribute's value. |
Redefinition of:
- atkAttribute::isEmpty()
- Check if a record has an empty value for this attribute.
void setFieldSeparator(
string
$separator
)
|
|
Allows you to set the field separator
which is used to separate values in the database. i.e use a comma separator for mysql set datatype
Parameters:
API Tags:
String value2db(
array
$rec
)
|
|
Converts the internal attribute value to one that is understood by the database.
Parameters:
|
array |
$rec: |
The record that holds this attribute's value. |
API Tags:
| Return: | The database compatible value |
Redefinition of:
- atkAttribute::value2db()
- Converts the internal attribute value to one that is understood by the database.
Redefined in descendants as:
a _addLinks(
string
$fieldprefix
)
|
|
Add the checkall, checknone and checkinvert links
Parameters:
|
string |
$fieldprefix: |
The fieldprefix |
API Tags:
| Return: | piece of htmlcode with the links |