atkTabbedPane atkTabbedPane(
String
$name, [Array
$tabs = array()], [int
$flags = 0]
)
|
|
Constructor
Parameters:
|
String |
$name: |
The name of the attribute |
|
Array |
$tabs: |
The arrays looks like array("tabname1"=>("attribname1,"attribname2),"tabname1"=>(..),..) |
|
int |
$flags: |
The flags for this attribute |
void add(
String
$attrib, [String
$tab = ""]
)
|
|
Add attribute to tabbedpane
Parameters:
|
String |
$attrib: |
The name of the attribute |
|
String |
$tab: |
The name of tab. If empty, attribute name used |
array buildTabs(
[String
$action = ""], [string
$fieldprefix = ""]
)
|
|
Builds a list of tabs.
This doesn't generate the actual HTML code, but returns the data for the tabs (title, selected, urls that should be loaded upon click of the tab etc).
Parameters:
|
String |
$action: |
The action for which the tabs should be generated. |
|
string |
$fieldprefix: |
The fieldprefix |
API Tags:
Information Tags:
| Todo: | Make translation of tabs module aware |
NULL db2value(
array
$record
)
|
|
No function, but is neccesary
Parameters:
Redefinition of:
- atkAttribute::db2value()
- Converts a database value to an internal value.
Return the database field type of the attribute.
API Tags:
Redefinition of:
- atkAttribute::dbFieldType()
- Return the database field type of the attribute.
html display(
array
$record, [string
$mode = ""]
)
|
|
Display a tabbed pane with attributes
Parameters:
|
array |
$record: |
Array with fields |
|
string |
$mode: |
The mode |
API Tags:
Redefinition of:
- atkAttribute::display()
- Returns a displayable string for this value, to be used in HTML pages.
String edit(
[array
$defaults = ""], [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 |
$defaults: |
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. |
|
String |
$mode: |
The mode we're in ('add' or 'edit') |
API Tags:
| Return: | A piece of htmlcode for editing this attribute |
Redefinition of:
- atkAttribute::edit()
- Returns a piece of html code that can be used in a form to edit this attribute's value.
Return default tab, now simply first tab
API Tags:
| Return: | The default tab name. |
Array getPaneTabs(
String
$action
)
|
|
Return list of all tabs, having in this attribute
Parameters:
|
String |
$action: |
An action name. Don't use now |
API Tags:
| Return: | The array name of tab. |
empty hide(
[array
$record = ""], [string
$fieldprefix = ""]
)
|
|
No function, but is necessary
Parameters:
|
array |
$record: |
|
|
string |
$fieldprefix: |
|
API Tags:
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">)
Bool isAttributeSingleOnTab(
String
$name
)
|
|
Check if attribute is single on the tab
Parameters:
|
String |
$name: |
The name of attribute |
API Tags:
| Return: | True if single. $todo Take into accout AF_HIDE_VIEW,AF_HIDE_EDIT flag of attribute - attribute can be placed on tab, but only in edit action - 2 attribute when edit and 1 -if view |
int loadType(
String
$mode, [boolean
$searching = false]
)
|
|
Determine the load type of this attribute.
Parameters:
|
String |
$mode: |
The type of load (view,admin,edit etc) |
|
boolean |
$searching: |
|
API Tags:
| Return: | NOLOAD - nor load(), nor addtoquery() should be called (attribute can not be loaded from the database) |
Redefinition of:
- atkAttribute::loadType()
- Determine the load type of this attribute.
Post init function
Redefinition of:
- atkAttribute::postInit()
- This function is called at the end of the node's init method.
int storageType(
String
$mode
)
|
|
Determine the storage type of this attribute.
Parameters:
|
String |
$mode: |
The type of storage ("add" or "update") |
API Tags:
| Return: | NOSTORE - nor store(), nor addtoquery() should be called (attribute can not be stored in the database) |
Redefinition of:
- atkAttribute::storageType()
- Determine the storage type of this attribute.
String tabulate(
string
$action, string
$content, [string
$fieldprefix = ""]
)
|
|
Tabulate
Parameters:
|
string |
$action: |
|
|
string |
$content: |
|
|
string |
$fieldprefix: |
|
API Tags:
void _addToEditArray(
String
$mode,
&$arr,
&$defaults,
&$error, String
$fieldprefix, array
$arr, array
$defaults, array
$error
)
|
|
Adds the attribute's edit / hide HTML code to the edit array.
Parameters:
|
String |
$mode: |
the edit mode ("add" or "edit") |
|
array |
$arr: |
pointer to the edit array |
|
array |
$defaults: |
pointer to the default values array |
|
array |
$error: |
pointer to the error array |
|
String |
$fieldprefix: |
the fieldprefix |
|
|
&$arr: |
|
|
|
&$defaults: |
|
|
|
&$error: |
|