atkProfileAttribute atkProfileAttribute(
string
$name, [string
$parentAttrName = ""], [int
$flags = 0]
)
|
|
Constructor
Parameters:
|
string |
$name: |
The name of the attribute |
|
string |
$parentAttrName: |
|
|
int |
$flags: |
The flags of this attribute |
Checks whether the current user has the 'grantall' privilege (if such a privilege exists; this is determined by the application by setting $config_auth_grantall_privilege.
Return the database field type of the attribute.
Note that the type returned is a 'generic' type. Each database vendor might have his own types, therefor, the type should be converted to a database specific type using $db->fieldType().
If the type was read from the table metadata, that value will be used. Else, the attribute will analyze its flags to guess what type it should be. If AF_AUTO_INCREMENT is set, the field is probaly "number". If not, it's probably "string".
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.
string display(
array
$record
)
|
|
Display rights.
It will only display the rights & nodes that are selected for the user.
Parameters:
API Tags:
| Return: | Displayable string |
| Access: | public |
Redefinition of:
- atkAttribute::display()
- Returns a displayable string for this value, to be used in HTML pages.
String 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: |
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.
String fetchValue(
array
$postvars
)
|
|
Convert values from an HTML form posting to an internal value for this attribute.
For the regular atkAttribute, this means getting the field with the same name as the attribute from the html posting.
Parameters:
|
array |
$postvars: |
The array with html posted values ($_POST, for example) that holds this attribute's value. |
API Tags:
| Return: | The internal value |
Redefinition of:
- atkAttribute::fetchValue()
- Convert values from an HTML form posting to an internal value for this attribute.
array getAllActions(
array
$record, [
$splitPerSection = false]
)
|
|
Retrieve all possible module/node actions.
Parameters:
|
array |
$record: |
The record |
|
|
$splitPerSection: |
|
API Tags:
| Return: | Array with actions |
array getChildGroups(
&$db, int
$id, atkDb
$db
)
|
|
Get child groups
Parameters:
|
atkDb |
$db: |
The database object |
|
int |
$id: |
The id to search for |
|
|
&$db: |
|
array getEditableActions(
array
$record
)
|
|
Returns a list of actions that should be edittable by the user.
Parameters:
|
array |
$record: |
The record |
API Tags:
| Return: | Array with editable actions |
Retrieve the list of searchmodes supported by the attribute.
Note that not all modes may be supported by the database driver. Compare this list to the one returned by the databasedriver, to determine which searchmodes may be used.
API Tags:
| Return: | List of supported searchmodes |
Redefinition of:
- atkAttribute::getSearchModes()
- Retrieve the list of searchmodes supported by the attribute.
array getSelectedActions(
array
$record
)
|
|
Returns the currently selected actions.
Parameters:
|
array |
$record: |
The record |
API Tags:
| Return: | array with selected actions |
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">)
Initially use an empty rights array.
API Tags:
Redefinition of:
- atkAttribute::initialValue()
- Initial value. Returns the initial value for this attribute which will be used in the add form etc.
array load(
&$db, array
$record, atkDb
$db
)
|
|
Load this record
Parameters:
|
atkDb |
$db: |
The database object |
|
array |
$record: |
The record |
|
|
&$db: |
|
API Tags:
| Return: | Array with loaded values |
String permissionName(
string
$action, [string
$nodename = ""], [string
$modulename = ""]
)
|
|
Return the translated name of a permission.
Parameters:
|
string |
$action: |
The name of the action |
|
string |
$nodename: |
The name of the node |
|
string |
$modulename: |
The name of the module |
API Tags:
| Return: | The translated permission name |
bool store(
&$db, array
$record, string
$mode, atkDb
$db
)
|
|
Store the value of this attribute in the database
Parameters:
|
atkDb |
$db: |
The database object |
|
array |
$record: |
The record which holds the values to store |
|
string |
$mode: |
The mode we're in |
|
|
&$db: |
|
API Tags:
| Return: | True if succesfull, false if not |
void _restoreDivStates(
&$page, atkPage
$page
)
|
|
Restore divs states
Parameters: