atkAggregatedColumn atkAggregatedColumn(
String
$name, String
$template, [int
$flags = 0], [Array
$searchfields = ""]
)
|
|
Constructor
Parameters:
|
String |
$name: |
Name of the attribute |
|
String |
$template: |
Display/sort template. |
|
int |
$flags: |
Flags for this attribute |
|
Array |
$searchfields: |
Array with fields, in which search will be perform If ommited, fields from $template will be used |
void addToListArrayHeader(
String
$action,
&$arr, String
$fieldprefix, int
$flags, array
$atksearch, string
$atkorderby, array
$arr
)
|
|
Adds the attribute / field to the list header. This includes the column name and search field.
Parameters:
|
String |
$action: |
the action that is being performed on the node |
|
array |
$arr: |
reference to the the recordlist array |
|
String |
$fieldprefix: |
the fieldprefix |
|
int |
$flags: |
the recordlist flags |
|
array |
$atksearch: |
the current ATK search list (if not empty) |
|
string |
$atkorderby: |
Order by string |
|
|
&$arr: |
|
API Tags:
Redefinition of:
- atkAttribute::addToListArrayHeader()
- Adds the attribute / field to the list header. This includes the column name and search field.
void addToQuery(
&$query, [String
$tablename = ""], [String
$fieldaliasprefix = ""], [Array
$rec = ""], int
$level, String
$mode, atkQuery
$query
)
|
|
Adds this attribute to database queries.
Parameters:
|
atkQuery |
$query: |
The SQL query object |
|
String |
$tablename: |
The name of the table of this attribute |
|
String |
$fieldaliasprefix: |
Prefix to use in front of the alias in the query. |
|
Array |
$rec: |
The record that contains the value of this attribute. |
|
int |
$level: |
Recursion level if relations point to eachother, an endless loop could occur if they keep loading eachothers data. The $level is used to detect this loop. If overriden in a derived class, any subcall to an addToQuery method should pass the $level+1. |
|
String |
$mode: |
Indicates what kind of query is being processing: This can be any action performed on a node (edit, add, etc) Mind you that "add" and "update" are the actions that store something in the database, whereas the rest are probably select queries. |
|
|
&$query: |
|
Redefinition of:
- atkAttribute::addToQuery()
- Adds this attribute to database queries.
Return the database field type of the attribute.
API Tags:
| Return: | The 'generic' type of the database field for this attribute. |
Redefinition of:
- atkAttribute::dbFieldType()
- Return the database field type of the attribute.
html display(
array
$record, [String
$mode = ""]
)
|
|
The display function for this attribute
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:
| Return: | code to display the value of this attribute |
Redefinition of:
- atkAttribute::display()
- Returns a displayable string for this value, to be used in HTML pages.
void getSearchCondition(
&$query, String
$table, mixed
$value, String
$searchmode, atkQuery
$query
)
|
|
Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
Parameters:
|
atkQuery |
$query: |
The query object where the search condition should be placed on |
|
String |
$table: |
The name of the table in which this attribute is stored |
|
mixed |
$value: |
The value the user has entered in the searchbox |
|
String |
$searchmode: |
The searchmode to use. This can be any one of the supported modes, as returned by this attribute's getSearchModes() method. |
|
|
&$query: |
|
Redefinition of:
- atkAttribute::getSearchCondition()
- Creates a searchcondition for the field, was once part of searchCondition, however, searchcondition() also immediately adds the search condition.
Retrieve the list of searchmodes supported by the attribute.
API Tags:
| Return: | List of supported searchmodes |
Redefinition of:
- atkAttribute::getSearchModes()
- Retrieve the list of searchmodes supported by the attribute.
void searchCondition(
&$query, String
$table, mixed
$value, String
$searchmode, [string
$fieldaliasprefix = ''], atkQuery
$query
)
|
|
Creates a search condition for a given search value, and adds it to the query that will be used for performing the actual search.
Parameters:
|
atkQuery |
$query: |
The query to which the condition will be added. |
|
String |
$table: |
The name of the table in which this attribute is stored |
|
mixed |
$value: |
The value the user has entered in the searchbox |
|
String |
$searchmode: |
The searchmode to use. This can be any one of the supported modes, as returned by this attribute's getSearchModes() method. |
|
string |
$fieldaliasprefix: |
optional prefix for the fiedalias in the table |
|
|
&$query: |
|
Redefinition of:
- atkAttribute::searchCondition()
- Creates a search condition for a given search value, and adds it to the query that will be used for performing the actual search.
boolean store(
atkDb
$db, array
$record, string
$mode
)
|
|
We do not want this attribute to store anything in the database, so we implement an empty store function
Parameters:
|
atkDb |
$db: |
|
|
array |
$record: |
|
|
string |
$mode: |
|
API Tags:
| Return: | to indicate if store went succesfull |