atkNode atkNode(
[String
$type = ""], [int
$flags = 0]
)
|
|
Constructor.
This initialises the node. Derived classes should always call their parent constructor ($this->atkNode($name, $flags), to initialize the base class.
Example:
Parameters:
|
String |
$type: |
The nodetype (by default equal to the classname) |
|
int |
$flags: |
Bitmask of node flags (NF_*). |
String actionTitle(
String
$action, [array
$record = ""]
)
|
|
Generate a title for a certain action on a certain action.
The default implementation displayes the action name, and the descriptor of the current record between brackets. This can be overridden by derived classes.
Parameters:
|
String |
$action: |
The action for which the title is generated. |
|
array |
$record: |
The record for which the title is generated. |
API Tags:
| Return: | The full title of the action. |
Add an atkAttribute (or one of its derivatives) to the node.
Parameters:
|
atkAttribute |
$attribute: |
The attribute you want to add |
|
mixed |
$sections: |
The sections/tab(s) on which the attribute should be displayed. Can be a tabname (String) or a list of tabs (array) or "*" if the attribute should be displayed on all tabs. |
|
int |
$order: |
The order at which the attribute should be displayed. If ommitted, this defaults to 100 for the first attribute, and 100 more for each next attribute that is added. |
API Tags:
| Return: | the attribute just added |
| Access: | public |
void addAllowedAction(
String
$action
)
|
|
Disable privilege checking for an action.
This method disables privilege checks for the specified action, for the duration of the current http request.
Parameters:
|
String |
$action: |
The name of the action for which security is disabled. |
boolean addDb(
&$record, [boolean
$exectrigger = true], [string
$mode = "add"], [array
$excludelist = array()], array
$record
)
|
|
Save a new record to the database.
The record is passed by reference, because any autoincrement field gets its value when stored to the database. The record is updated, so after the call to addDb you can use access the primary key fields.
NOTE: Does not commit your transaction! If you are using a database that uses transactions you will need to call 'atkGetDb()->commit()' manually.
Parameters:
|
array |
$record: |
The record to save. |
|
boolean |
$exectrigger: |
Indicates whether the postAdd trigger should be fired. |
|
string |
$mode: |
The mode we're in |
|
array |
$excludelist: |
List of attributenames that should be ignored and not stored in the database. |
|
|
&$record: |
|
API Tags:
| Return: | True if succesful, false if not. |
Redefined in descendants as:
void addDefaultExpandedSections(
)
|
|
Add sections that must be expanded by default.
void addFieldSet(
string
$name, string
$template, [int
$flags = 0], [mixed
$sections = NULL], [int
$order = 0]
)
|
|
Add fieldset.
To include an attribute label use [attribute.label] inside your template. To include an attribute edit/display field use [attribute.field] inside your template.
Parameters:
|
string |
$name: |
name |
|
string |
$template: |
template string |
|
int |
$flags: |
attribute flags |
|
mixed |
$sections: |
The sections/tab(s) on which the attribute should be displayed. Can be a tabname (String) or a list of tabs (array) or "*" if the attribute should be displayed on all tabs. |
|
int |
$order: |
The order at which the attribute should be displayed. If ommitted, this defaults to 100 for the first attribute, and 100 more for each next attribute that is added. |
API Tags:
void addFilter(
String
$filter, [String
$value = ""]
)
|
|
Add a recordset filter.
Parameters:
|
String |
$filter: |
The fieldname you want to filter OR a SQL where clause expression. |
|
String |
$value: |
Required value. (Ommit this parameter if you pass an SQL expression for $filter.) |
void addFlag(
int
$flag
)
|
|
Add a flag to the node.
Parameters:
|
int |
$flag: |
The flag to add. |
Add an atkActionListener to the node.
Parameters:
void addSecurityMap(
Mixed
$action, [String
$mapped = ""]
)
|
|
Set the security of one or more actions action the same as other actions.
If $mapped is empty $action has to be an array. The key would be used as action and would be mapped to the value. If $mapped is not empty $action kan be a string containing one action of an array with one or more action. In both cases al actions would be mapped to $mappped
Parameters:
|
Mixed |
$action: |
The action that has to be mapped |
|
String |
$mapped: |
The action on witch $action has to be mapped |
void addStyle(
String
$style
)
|
|
Add a stylesheet to the page.
The theme engine is used to determine the path, and load the correct stylesheet.
Parameters:
|
String |
$style: |
The filename of the stylesheet (without path). |
void addToQuery(
&$query, [String
$alias = ""], [int
$level = 0], [boolean
$allfields = false], [string
$mode = "select"], [array
$includes = array()], atkQuery
$query
)
|
|
Add this node to an existing query.
Framework method, it should not be necessary to call this method directly. This method is used when adding the entire node to an existing query, as part of a join.
Parameters:
|
atkQuery |
$query: |
The query statement |
|
String |
$alias: |
The aliasprefix to use for fields from this node |
|
int |
$level: |
The recursion level. |
|
boolean |
$allfields: |
If set to true, all fields from the node are added to the query. If set to false, only the primary key and fields from the desriptor are added. |
|
string |
$mode: |
The mode we're in |
|
array |
$includes: |
List of fields that should be included |
|
|
&$query: |
|
Information Tags:
| Todo: | The allfields parameter is too inflexible. |
void addUniqueFieldset(
array
$fieldArr
)
|
|
Add a unique field set.
When you add a set of attributes using this method, any combination of values for the attributes should be unique. For example, if you pass array("name", "parent_id"), name does not have to be unique, parent_id does not have to be unique, but the combination should be unique.
Parameters:
|
array |
$fieldArr: |
The list of names of attributes that should be unique in combination. |
boolean allowed(
String
$action, [array
$record = ""]
)
|
|
This function determines if the user has the privilege to perform a certain action on the node.
Parameters:
|
String |
$action: |
The action to be checked. |
|
array |
$record: |
The record on which the action is to be performed. The standard implementation ignores this parameter, but derived classes may override this method to implement their own record based security policy. Keep in mind that a record is not passed in every occasion. The method is called several times without a record, to just see if the user has the privilege for the action regardless of the record being processed. |
API Tags:
| Return: | True if the action may be performed, false if not. |
void applySearchCriteria(
&$query, array
$searchArray, atkQuery
$query
)
|
|
Apply the given search criteria to the given query object.
Parameters:
|
atkQuery |
$query: |
The query object. |
|
array |
$searchArray: |
The search criteria. |
|
|
&$query: |
|
void applySmartSearchCriteria(
&$query, Array
$criteria, atkQuery
$query
)
|
|
Apply the given smart search criteria to the given query object.
Parameters:
|
atkQuery |
$query: |
The query object. |
|
Array |
$criteria: |
The smart search criteria. |
|
|
&$query: |
|
Get the full atknodetype of this node (module.nodetype notation). This is sometimes referred to as the node name (or nodename) or node string.
API Tags:
| Return: | The atknodetype of the node. |
This function resorts the attribIndexList.
This is necessary if you add attributes *after* init() is already called, and you set an order for those attributes.
int attrib_cmp(
array
$a, array
$b
)
|
|
Small compare function for sorting attribs on order field
Parameters:
|
array |
$a: |
The first attribute |
|
array |
$b: |
The second attribute |
API Tags:
array buildTabs(
[String
$action = ""]
)
|
|
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. |
API Tags:
Information Tags:
| Todo: | Make translation of tabs module aware |
void callHandler(
String
$action
)
|
|
Invoke the handler for an action.
If there is a known registered external handler method for the specified action, this method will call it. If there is no custom external handler, the atkActionHandler object is determined and the actionis invoked on the actionhandler.
Parameters:
|
String |
$action: |
the node action |
void changeMapping(
string
$oldmapped, string
$newmapped
)
|
|
change the securitymap that already exist. Where actions are mapped on $oldmapped change it by $newmapped
Parameters:
|
string |
$oldmapped: |
the old value |
|
string |
$newmapped: |
the new value with replace the old one |
void checkAttributeSecurity(
string
$mode, [array
$record = NULL]
)
|
|
Check attribute security.
Makes some attributes read-only, or hides the attribute based on the current mode / record.
Parameters:
|
string |
$mode: |
current mode (add, edit, view etc.) |
|
array |
$record: |
current record (optional) |
array checkEmptyTabs(
array
$list
)
|
|
Remove tabs without attribs from the tablist
Parameters:
|
array |
$list: |
The list of tabnames |
API Tags:
| Return: | The list of tabnames without the empty tabs. |
array checkTabRights(
&$tablist, array
$tablist
)
|
|
Check if the user has the rights to access existing tabs and removes tabs from the list that may not be accessed
Parameters:
|
array |
$tablist: |
Array containing the current tablist |
|
|
&$tablist: |
|
API Tags:
| Return: | with disable tabs |
Redefined in descendants as:
String confirmAction(
mixed
$atkselector, String
$action, [boolean
$locked = false], [boolean
$checkoverride = true], [boolean
$mergeSelectors = true]
)
|
|
Function returns a page in which the user is asked if he really wants to perform a certain action.
Parameters:
|
mixed |
$atkselector: |
Selector of current record on which the action will be performed (String), or an array of selectors when multiple records are processed at once. The method uses the selector(s) to display the current record(s) in the confirmation page. |
|
String |
$action: |
The action for which confirmation is needed. |
|
boolean |
$locked: |
Pass true if the current record is locked. |
|
boolean |
$checkoverride: |
If set to true, this method will try to find a custom method named "confirm".$action."()" (e.g. confirmDelete() and call that method instead. |
|
boolean |
$mergeSelectors: |
Merge all selectors to one selector string (if more then one)? |
API Tags:
| Return: | Complete html fragment containing a box with the confirmation page, or the output of the custom override if $checkoverride was true. |
String confirmActionText(
[String
$atkselector = ""], [String
$action = "delete"], [boolean
$checkoverride = TRUE]
)
|
|
Determine the confirmation message.
Parameters:
|
String |
$atkselector: |
The record(s) on which the action is performed. |
|
String |
$action: |
The action being performed. |
|
boolean |
$checkoverride: |
If true, returns the output of a custom method named "confirm".$action."text()" |
API Tags:
| Return: | The confirmation text. |
boolean copyDb(
&$record, [string
$mode = "copy"], array
$record
)
|
|
Copy a record in the database.
Primarykeys are automatically regenerated for the copied record. Any detail records (onetomanyrelation) are copied too. Refered records manytoonerelation) are not copied.
Parameters:
|
array |
$record: |
The record to copy. |
|
string |
$mode: |
The mode we're in (mostly "copy") |
|
|
&$record: |
|
API Tags:
| Return: | True if succesful, false if not. |
Redefined in descendants as:
int countDb(
[String
$selector = ""], [array
$excludeList = ""], [array
$includeList = ""], [String
$mode = ""], [boolean
$distinct = false], [
$ignoreDefaultFilters = false], boolean
$ignoreDefaultFilter
)
|
|
Count the number of records in the database that a call to selectDb would return.
Parameters:
|
String |
$selector: |
Sql expression used as a where-condition, to count only records that match the expression. |
|
array |
$excludeList: |
List of attributes to be excluded from the query. By default, the attributes that should be loaded are determined by the $mode parameter. Using $excludeList, you can explicitly exclude attributes. |
|
array |
$includeList: |
List of attributes to include in the query, regardless of the $mode parameter. |
|
String |
$mode: |
The action for which the selectDb is called. This param is used to determine which attributes to include in the query and which not to include. |
|
boolean |
$distinct: |
Perform a distinct selection (no duplicate records). Defaults to true. |
|
boolean |
$ignoreDefaultFilter: |
Ignore default node filters. |
|
|
$ignoreDefaultFilters: |
|
API Tags:
| Return: | Number of records |
Redefined in descendants as:
Returns a new page builder instance.
API Tags:
array defaultActions(
String
$mode, [array
$params = array()]
)
|
|
Retrieve an array with the default actions for a certain mode.
This will return a list of actions that can be performed on records of this node in an admin screen. The actions may contain a [pk] template variable to reference a record, so for each record you should run the stringparser on the action.
Parameters:
|
String |
$mode: |
The mode for which you want a list of actions. Currently available modes for this method: - "admin" (for actions in adminscreens)
- "relation" (for the list of actions when
displaying a recordlist in a onetomany-relation)
- "view" (for actions when viewing only)
Note: the default implementation of defaultActions makes no difference between "relation" and "admin" and will return the same actions for both, but you might want to override this behaviour in derived classes. |
|
array |
$params: |
An array of extra parameters to add to all the action urls. You can use this to pass things like an atkfilter for example. The array should be key/value based. |
API Tags:
| Return: | List of actions in the form array($action=>$actionurl) |
boolean deleteDb(
String
$selector, [bool
$exectrigger = true], [bool
$failwhenempty = false]
)
|
|
Delete record(s) from the database.
After deletion, the postDel() trigger in the node method is called, and on any attribute that has the AF_CASCADE_DELETE flag set, the delete() method is invoked.
NOTE: Does not commit your transaction! If you are using a database that uses transactions you will need to call 'atkGetDb()->commit()' manually.
Parameters:
|
String |
$selector: |
SQL expression used as where-clause that indicates which records to delete. |
|
bool |
$exectrigger: |
wether to execute the pre/post triggers |
|
bool |
$failwhenempty: |
determine whether to throw an error if there is nothing to delete |
API Tags:
| Return: | True if successful, false if not. |
Information Tags:
| Todo: | There's a discrepancy between updateDb, addDb and deleteDb: There should be a deleteDb which accepts a record, instead of a selector. |
Redefined in descendants as:
String descriptor(
[array
$rec = ""]
)
|
|
Determine a descriptor of a record.
The descriptor is a string that describes a record for the user. For person records, this may be the firstname and the lastname, for companies it may be the company name plus the city etc. The descriptor is used when displaying records in a dropdown for example, or in the title of editpages, delete confirmations etc.
The descriptor method calls a method named descriptor_def() on the node to retrieve a template for the descriptor (string with attributenames between blockquotes, for example "[lastname], [firstname]".
If the node has no descriptor_def() method, the first attribute of the node is used as descriptor.
Derived classes may override this method to implement custom descriptor logic.
Parameters:
|
array |
$rec: |
The record for which the descriptor is returned. |
API Tags:
| Return: | The descriptor for the record. |
array descriptorFields(
)
|
|
Retrieve the list of attributes that are used in the descriptor definition.
API Tags:
| Return: | The names of the attributes forming the descriptor. |
void dispatch(
array
$postvars, [int
$flags = NULL]
)
|
|
This is the wrapper method for all http requests on a node.
The method looks at the atkaction from the postvars and determines what should be done. If possible, it instantiates actionHandlers for handling the actual action.
Parameters:
|
array |
$postvars: |
The request variables for the node. |
|
int |
$flags: |
Render flags (see class atkPage). |
array editArray(
[String
$mode = "add"], [array
$record = NULL], [array
$forceList = ""], [array
$suppressList = ""], [String
$fieldprefix = ""], [bool
$ignoreTab = false], [bool
$injectSections = true]
)
|
|
Function outputs an array with edit fields. For each field the array contains the name, edit HTML code etc. (name, html, obligatory, error, label)
Parameters:
|
String |
$mode: |
The edit mode ("add" or "edit") |
|
array |
$record: |
The record currently being edited. |
|
array |
$forceList: |
A key-value array used to preset certain fields to a certain value, regardless of the value in the record. |
|
array |
$suppressList: |
List of attributenames that you want to hide |
|
String |
$fieldprefix: |
Of set, each form element is prefixed with the specified prefix (used in embedded form fields) |
|
bool |
$ignoreTab: |
Ignore the tabs an attribute should be shown on. |
|
bool |
$injectSections: |
Inject sections? |
API Tags:
| Return: | List of edit fields (per field ( name, html, obligatory, error, label }) |
Information Tags:
| Todo: | The editArray method should use a set of classes to build the form, instead of an array with an overly complex structure. |
array edit_values(
array
$record
)
|
|
Retrieve new values for an existing record.
The system calls this method to override the values of a record before editing the record. The default implementation does not do anything to the record, but derived classes may override this method to make modifications to. the record.
Parameters:
|
array |
$record: |
The record that is about to be edited. |
API Tags:
| Return: | The manipulated record. |
string escapeSQL(
string
$string
)
|
|
Escape SQL string, uses the node's database to do the escaping.
Parameters:
|
string |
$string: |
string to escape |
API Tags:
| Return: | escaped string |
| Access: | public |
bool executeTrigger(
string
$trigger,
&$record, [string
$mode = null], array
$record
)
|
|
Executes a trigger on a add,update or delete action
To prevent triggers from executing twice, the method stores an indication in the record when a trigger is executed. ('__executed<triggername>')
Parameters:
|
string |
$trigger: |
function, such as 'postUpdate' |
|
array |
$record: |
record on which action is performed |
|
string |
$mode: |
mode like add or update |
|
|
&$record: |
|
API Tags:
| Return: | true on case of success or when the trigger isn't returning anything (assumes success) |
String feedbackUrl(
String
$action, int
$status, [array
$record = ""], [String
$message = ""], [int
$levelskip = 1]
)
|
|
Determine the url for the feedbackpage.
Output is dependent on the feedback configuration. If feedback is not enabled for the action, this method returns an empty string, so the result of this method can be passed directly to the redirect() method after completing the action.
The $record parameter is ignored by the default implementation, but derived classes may override this method to perform record-specific feedback.
Parameters:
|
String |
$action: |
The action that was performed |
|
int |
$status: |
The status of the action. |
|
array |
$record: |
The record on which the action was performed. |
|
String |
$message: |
An optional message to pass to the feedbackpage, for example to explain the reason why an action failed. |
|
int |
$levelskip: |
Number of levels to skip |
API Tags:
| Return: | The feedback url. |
array fetchByPk(
int
$pk
)
|
|
Returns a record (array) as identified by a primary key (usually an "id" column), including applicable relations.
Parameters:
|
int |
$pk: |
primary key identifying the record |
API Tags:
| Return: | the associated record, or null if no such record exists |
| Access: | public |
boolean. &filledInForm(
-
0
)
|
|
Checks if the user has filled in something: return true if he has, otherwise return false
Parameters:
String genericPage(
String
$title, mixed
$content
)
|
|
Render a generic page, with a box, title, stacktrace etc.
Parameters:
|
String |
$title: |
The pagetitle and if $content is a string, also the boxtitle. |
|
mixed |
$content: |
The content to display on the page. This can be: - A string which will be the content of a single
box on the page.
- An associative array of $boxtitle=>$boxcontent
pairs. Each pair will be rendered as a seperate
box.
|
API Tags:
| Return: | A complete html page with the desired content. |
void getActiveSections(
string
$tab, string
$mode
)
|
|
Get the active sections.
Parameters:
|
string |
$tab: |
The currently active tab |
|
string |
$mode: |
The current mode ("edit", "add", etc.) |
Returns the currently active tab.
Note that in themes which use dhtml tabs (tabs without reloads), this method will always return the name of the first tab.
API Tags:
| Return: | The name of the currently visible tab. |
Get an attribute by name.
Parameters:
|
String |
$name: |
The name of the attribute to retrieve. |
API Tags:
array getAttributeNames(
)
|
|
Returns a list of attribute names.
API Tags:
void getAttributeOrder(
string
$name
)
|
|
Gets the attribute order.
Parameters:
|
string |
$name: |
The name of the attribute |
Gets all the attributes.
API Tags:
| Return: | Array with the attributes. |
atkColumnConfig &getColumnConfig(
[string
$id = NULL], [boolean
$forceNew = false]
)
|
|
Get the column configuration object
Parameters:
|
string |
$id: |
optional column config id |
|
boolean |
$forceNew: |
force new instance? |
Get the database connection for this node.
API Tags:
| Return: | Database connection instance |
array getDefaultActionParams(
[boolean
$locked = false]
)
|
|
Determine the default form parameters for an action template.
Parameters:
|
boolean |
$locked: |
If the current record is locked, pass true, so the lockicon can be placed in the params too. |
API Tags:
| Return: | Default form parameters for action forms (assoc. array) |
string getDefaultColumn(
)
|
|
Returns the default column name.
API Tags:
| Return: | default column name |
| Access: | public |
Object &getDescriptorHandler(
)
|
|
Get descriptor handler.
API Tags:
| Return: | descriptor handler |
String getDescriptorTemplate(
)
|
|
Returns the descriptor template for this node.
API Tags:
| Return: | The descriptor Template |
string getEditFieldPrefix(
[boolean
$atk_layout = true]
)
|
|
Get the edit fieldprefix to use
Parameters:
|
boolean |
$atk_layout: |
do we want the prefix in atkstyle (with _AE_) or not |
API Tags:
| Return: | with edit fieldprefix |
extended getExtendedSearchAction(
)
|
|
Get extended search action.
API Tags:
Returns the node flags.
API Tags:
array getFormButtons(
String
$mode, array
$record
)
|
|
Returns the form buttons for a certain page.
Can be overridden by derived classes to define custom buttons.
Parameters:
|
String |
$mode: |
The action for which the buttons are retrieved. |
|
array |
$record: |
The record currently displayed/edited in the form. This param can be used to define record specific buttons. |
Get the atkActionHandler object for a certain action.
The default implementation returns a default handler for the action, but derived classes may override this to return a custom handler.
Parameters:
|
String |
$action: |
The action for which the handler is retrieved. |
API Tags:
| Return: | The action handler. |
Retrieve help link for the current node.
API Tags:
| Return: | Complete html link, linking to the help popup. |
Returns the lock mode.
API Tags:
| Return: | lock mode (atkLock::EXCLUSIVE, atkLock::SHARED) |
| Access: | public |
String getLockStatusIcon(
boolean
$lockstatus
)
|
|
Get img tag for lock icon.
Parameters:
|
boolean |
$lockstatus: |
True if the record is locked, false if not. |
API Tags:
| Return: | HTML image tag with the correct lock icon. |
Returns the module for this node.
API Tags:
| Return: | node |
| Access: | public |
Integer getMRASelectionMode(
)
|
|
Returns the multi-record-action selection mode.
API Tags:
| Return: | multi-record-action selection mode |
Gets the numbering of the attributes
API Tags:
| Return: | the number whith which the numbering starts |
Get default sort order for the node.
API Tags:
| Return: | Default order by. Can be an attribute name or a SQL expression. |
Get the page instance of the page on which the node can render output.
API Tags:
| Return: | The page instance. |
string getSearchCondition(
&$query, string
$table, string
$alias, string
$value, string
$searchmode, atkQuery
$query
)
|
|
Get search condition for this node.
Parameters:
|
atkQuery |
$query: |
|
|
string |
$table: |
|
|
string |
$alias: |
|
|
string |
$value: |
|
|
string |
$searchmode: |
|
|
|
&$query: |
|
API Tags:
| Return: | The search condition |
Get the current searchmode.
API Tags:
| Return: | If there is one searchmode set for all attributes, this method returns a string. If there are searchmodes per attribute, an array of strings is returned. |
array getSections(
String
$action
)
|
|
Retrieve the sections for the active tab.
Parameters:
API Tags:
| Return: | The active sections. |
string getSecurityAlias(
)
|
|
Returns the node's security alias (if set).
API Tags:
void getTabFromSection(
string
$section
)
|
|
Strip section part from a section and return the tab.
If no tab name is provided, the default tab is returned.
Parameters:
|
string |
$section: |
The section to get the tab from |
Returns the table name for this node.
API Tags:
array getTabs(
String
$action
)
|
|
Get a list of tabs for a certain action.
Parameters:
|
String |
$action: |
The action for which you want to retrieve the list of tabs. |
API Tags:
| Return: | The list of tabnames. |
Redefined in descendants as:
void getTabsFromSections(
mixed
$sections
)
|
|
Retrieve the tabnames from the sections string (tab.section).
Parameters:
|
mixed |
$sections: |
An array with sections or a section string |
String getTemplate(
String
$action, [array
$record = NULL], [String
$tab = ""]
)
|
|
Get the template to use for a certain action.
The system calls this method to determine which template to use when rendering a certain screen. The default implementation always returns the same template for the same action (it ignores parameter 2 and 3). You can override this method in derived classes however, to determine on the fly which template to use. The action, the current record (if any) and the tab are passed as parameter. By using these params, you can have custom templates per action, and/or per tab, and even per record.
Parameters:
|
String |
$action: |
The action for which you wnat to retrieve the template. |
|
array |
$record: |
The record for which you want to return the template (or NULL if there is no record). |
|
String |
$tab: |
The name of the tab for which you want to retrieve the template. |
API Tags:
| Return: | The filename of the template (without path) |
Returns the type of this node. (This is *not* the full ATK node type; see atkNodeType() for the full node type.)
API Tags:
| Return: | type |
| Access: | public |
Get the ui instance for drawing and templating purposes.
API Tags:
| Return: | An atkUi instance for drawing and templating. |
void groupFieldsBySection(
&$fields, array
$fields
)
|
|
Group fields by section.
Parameters:
|
array |
$fields: |
fields array (will be modified in-place) |
|
|
&$fields: |
|
boolean hasFlag(
int
$flag
)
|
|
Checks if the node has a certain flag set.
Parameters:
|
int |
$flag: |
The flag to check. |
API Tags:
| Return: | True if the node has the flag. |
Get the help url for this node.
Retrieves the url of the help popup, if there is help available for this node.
API Tags:
| Return: | The help url, or an empty string if help is not available. |
String hideForm(
[String
$mode = "add"], [array
$record = NULL], [array
$forceList = ""], [String
$fieldprefix = ""]
)
|
|
Function outputs a form with all values hidden.
This is probably only useful for the atkOneToOneRelation's hide method.
Parameters:
|
String |
$mode: |
The edit mode ("add" or "edit") |
|
array |
$record: |
The record that should be hidden. |
|
array |
$forceList: |
A key-value array used to preset certain fields to a certain value, regardless of the value in the record. |
|
String |
$fieldprefix: |
Of set, each form element is prefixed with the specified prefix (used in embedded form fields) |
API Tags:
| Return: | HTML fragment containing all hidden elements. |
This function initialises certain elements of the node.
This must be called right after the constructor. The function has a check to prevent it from being executed twice. If you construct a node using 'new', you have to call this method. If you construct it with the getNode or newNode method, you don't have to call this method.
Retrieve the initial values for a new record.
The system calls this method to create a new record. By default this method returns an empty record, but derived nodes may override this method to perform record initialization.
API Tags:
| Return: | Array containing an initial value per attribute. Only attributes that are initialized appear in the array. |
void injectSections(
&$fields, array
$fields
)
|
|
Add sections to the edit/view fields array.
Parameters:
|
array |
$fields: |
fields array (will be modified in-place) |
|
|
&$fields: |
|
bool isAllowedQueryList(
string
$attribname, [array
$excludeList = ""], [array
$includeList = ""], [string
$mode = ""]
)
|
|
Checks if the attribute is needed in a select query
Parameters:
|
string |
$attribname: |
name of the attribute |
|
array |
$excludeList: |
list of exclueded attribs |
|
array |
$includeList: |
list of inclueded attribs |
|
string |
$mode: |
the mode for which the selectDb is called |
API Tags:
| Return: | true in case the attribute needs to be in the select |
Is partial request?
API Tags:
Generate a box displaying a message that the current record is locked.
API Tags:
| Return: | The HTML fragment containing a box with the message and a back-button. |
void modifyRecord(
&$record, array
$vars, array
$record
)
|
|
Update a record with variables from a form posting.
Similar to updateRecord(), but here you can pass an existing record (for example loaded from the db), and update it with the the variables from the request. Instead of returning a record, the record you pass is modified directly.
Parameters:
|
array |
$record: |
The record to update. |
|
array |
$vars: |
The request variables that were posted from a form. |
|
|
&$record: |
|
void notify(
String
$action, array
$record
)
|
|
Notify all listeners of the occurance of a certain action.
Parameters:
|
String |
$action: |
The action that occurred |
|
array |
$record: |
The record on which the action was performed |
boolean postAdd(
array
$record, [String
$mode = "add"]
)
|
|
Function that is called by the framework, right after a new record has been saved to the database.
This function does essentially nothing, but it can be overriden in derived classes if you want to do something special after you saved a record.
Parameters:
|
array |
$record: |
The record that has just been saved. |
|
String |
$mode: |
The 'mode' indicates whether the added record was a completely new record ("add") or a copy ("copy"). |
API Tags:
| Return: | True if succesful, false if not. |
Redefined in descendants as:
bool postDel(
array
$record
)
|
|
Deprecated function that is called by the framework, right after a record has been deleted.
Please use postDelete() instead.
Parameters:
|
array |
$record: |
The record that has just been deleted. |
API Tags:
| Return: | Wether or not we succeeded in what we wanted to do. |
bool postDelete(
array
$record
)
|
|
Function that is called by the framework, right after a record has been deleted.
This function does essentially nothing, but it can be overriden in derived classes if you want to do something special after a record is deleted.
Parameters:
|
array |
$record: |
The record that has just been deleted. |
API Tags:
| Return: | Wether or not we succeeded in what we wanted to do. |
Redefined in descendants as:
boolean postUpdate(
array
$record
)
|
|
Function that is called by the framework, right after an existing record has been updated in the database.
This function does essentially nothing, but it can be overriden in derived classes if you want to do something special after the record is updated.
If the NF_TRACK_CHANGES flag is present for the node, both the new and the original record are passed to this method. The original record is stored in the new record, in $record["atkorgrec"].
Parameters:
|
array |
$record: |
The record that has just been updated in the database. |
API Tags:
| Return: | True if succesful, false if not. |
Redefined in descendants as:
void preAdd(
&$record, array
$record
)
|
|
Function that is called by the framework, just before a new record will be saved to the database.
This function does essentially nothing, but it can be overriden in derived classes if you want to modify the record just before it will be saved.
Parameters:
|
array |
$record: |
The record that will be saved to the database. |
|
|
&$record: |
|
Redefined in descendants as:
void preAddToEditArray(
&$record, [string
$mode = "add"], array
$record
)
|
|
The preAddToEditArray method is called from within the editArray
method prior to letting the attributes add themselves to the edit array, but after the edit record values have been collected (a combination of the current record, initial/edit values and the forced values). This makes it possible to do some last-minute modifications to the record data and possibily add some last-minute attributes etc.
Parameters:
|
array |
$record: |
the edit record |
|
string |
$mode: |
edit mode (add or edit) |
|
|
&$record: |
|
void preCopy(
&$record, array
$record
)
|
|
Function that is called by the framework, right before a copied record is stored to the database.
This function does nothing, but it can be overriden in derived classes if you want to do some processing on a record before it is being copied. Typical usage would be: Suppose you have a field named 'title' in a record. In the preCopy method, you could change the title field of the record to 'Copy of ..', so the user can distinguish between the original and the copy.
Parameters:
|
array |
$record: |
A reference to the copied record. You can change the contents of the record, since it is passed by reference. |
|
|
&$record: |
|
void preDelete(
array
$record
)
|
|
Function that is called by the framework, right before a record will be deleted. Should this method return false the deleting will halt.
This function does essentially nothing, but it can be overriden in derived classes if you want to do something special after a record is deleted.
If this function returns false the delete action will not continue.
Parameters:
|
array |
$record: |
The record that will be deleted. |
Redefined in descendants as:
void preNotify(
String
$action,
&$record, array
$record
)
|
|
Notify all listeners in advance of the occurance of a certain action.
Parameters:
|
String |
$action: |
The action that will occur |
|
array |
$record: |
The record on which the action will be performed |
|
|
&$record: |
|
bool preUpdate(
&$record, array
$record
)
|
|
Function that is called by the framework, just before an existing record will be saved to the database.
This function does essentially nothing, but it can be overriden in derived classes if you want to modify the record just before it will be saved.
Parameters:
|
array |
$record: |
The record that will be updated in the database. |
|
|
&$record: |
|
API Tags:
| Return: | Wether or not we succeeded in what we wanted to do. |
Redefined in descendants as:
String primaryKey(
array
$rec
)
|
|
Returns the primary key sql expression of a record.
Parameters:
|
array |
$rec: |
The record for which the primary key is calculated. |
API Tags:
| Return: | the primary key of the record. |
String primaryKeyField(
)
|
|
Retrieve the name of the primary key attribute.
Note: If a node has a primary key that consists of multiple attributes, this method will retrieve only the first attribute!
API Tags:
| Return: | First primary key attribute |
Returns a primary key template.
Like primaryKey(), this method returns a sql expression, but in this case, no actual data is used. Instead, template fields are inserted into the expression. This is useful for rendering multiple primary keys later with a record and a template parser.
API Tags:
| Return: | Primary key template |
void recordActions(
array
$record, array
&$actions, array
&$mraactions
)
|
|
Function that is called for each record in a recordlist, to determine what actions may be performed on the record.
This function does nothing, but it can be overriden in derived classes, to make custom actions for certain records. The array with actions (edit, delete, etc.) is passed to the function and can be modified. To create a new action, just do $actions["new_action"]=$url; in the derived function. To disable existing actions, for example the edit action, for a record, use: unset($actions["edit"]);
Parameters:
|
array |
$record: |
The record for which the actions need to be determined. |
|
array |
&$actions: |
Reference to an array with the already defined actions. This is an associative array with the action identifier as key, and an url as value. Actions can be removed from it, or added to the array. |
|
array |
&$mraactions: |
List of multirecordactions that are supported for the passed record. |
Redefined in descendants as:
void redirect(
[String
$location = ""], [array
$recordOrExit = array()], [boolean
$exit = false], [int
$levelskip = 1]
)
|
|
Redirect the browser to a different location.
This is usually used at the end of actions that have no output. An example: when the user clicks 'save and close' in an edit screen, the action 'save' is executed. If the save is succesful, this method is called to redirect the user back to the adminpage. When $config_debug is set to 2, redirects are paused and you can click a link to execute the redirect (useful for debugging the action that called the redirect). Note: this method should be called before any output has been sent to the browser, i.e. before any echo or before the call to atkOutput::outputFlush().
Parameters:
|
String |
$location: |
The url to which you want to redirect the user. If ommitted, the call automatically redirects to the previous screen of the user. (one level back on the session stack). |
|
array |
$recordOrExit: |
If you pass a record here, the record is passed as 'atkpkret' to the redirected url. Usually it's not necessary to pass this parameter. If you pass a boolean here we assume it's value must be used for the exit parameter. |
|
boolean |
$exit: |
Exit script after redirect. |
|
int |
$levelskip: |
Number of levels to skip |
void remove(
String
$attribname
)
|
|
Remove an attribute.
Completely removes an attribute from a node. Note: Since other functionality may already depend on the attribute that you are about to remove, it's often better to just hide an attribute if you don't need it.
Parameters:
|
String |
$attribname: |
The name of the attribute to remove. |
void removeDefaultExpandedSections(
)
|
|
Remove sections that must be expanded by default.
TRUE removeFilter(
String
$filter, [String
$value = ""]
)
|
|
Search and remove a recordset filter.
Parameters:
|
String |
$filter: |
The filter to search for |
|
String |
$value: |
The value to search for in case it is not a fuzzy filter |
API Tags:
| Return: | if the given filter was found and removed, FALSE otherwise. |
void removeFlag(
int
$flag
)
|
|
Removes a flag from the node.
Parameters:
|
int |
$flag: |
The flag to remove from the attribute |
String renderActionPage(
String
$action, [mixed
$blocks = array()]
)
|
|
Render a generic action.
Renders actionpage.tpl for the desired action. This includes the given block(s) and a pagetrial, but not a box.
Parameters:
|
String |
$action: |
The action for which the page is rendered. |
|
mixed |
$blocks: |
Pieces of html content to be rendered. Can be a single string with content, or an array with multiple content blocks. |
API Tags:
| Return: | Piece of HTML containing the given blocks and a pagetrail. |
string resolveColumn(
&$sections, array
$sections
)
|
|
Resolve column for sections.
If one of the sections contains something after a double colon (:) than that's used as column name, else the default column name will be used.
Parameters:
|
array |
$sections: |
sections |
|
|
&$sections: |
|
API Tags:
| Return: | column name |
| Access: | protected |
void resolveNodeTypeAndAction(
&$alias,
&$action, string
$alias, string
$action
)
|
|
Resolves a possible node / action alias for the given node / action.
The given node alias and action are updated depending on the found mapping.
Parameters:
|
string |
$alias: |
node type |
|
string |
$action: |
action name |
|
|
&$alias: |
|
|
|
&$action: |
|
resolved resolveSection(
string
$section
)
|
|
Resolve section. If a section is only prefixed by a dot this means we need to add the default tab before the dot.
Parameters:
|
string |
$section: |
section name |
API Tags:
array resolveSections(
array
$sections
)
|
|
Resolve sections.
Parameters:
|
array |
$sections: |
section list |
API Tags:
void resolveSectionsTabsOrder(
&$sections,
&$tabs,
&$column,
&$order, mixed
$sections, mixed
$tabs, mixed
$order
)
|
|
Resolve sections, tabs and the order based on the given argument to the attribute add method.
Parameters:
|
mixed |
$sections: |
|
|
mixed |
$tabs: |
|
|
mixed |
$order: |
|
|
|
&$sections: |
|
|
|
&$tabs: |
|
|
|
&$column: |
|
|
|
&$order: |
|
array searchDb(
String
$expression, [string
$searchmethod = "OR"]
)
|
|
Search all records for the occurance of a certain expression.
This function searches in all fields that are not AF_HIDE_SEARCH, for a certain expression (substring match). The search performed is an 'or' search. If any of the fields contains the expression, the record is added to the resultset.\
Currently, searchDb only searches those attributes that are of type string or text.
Parameters:
|
String |
$expression: |
The keyword to search for. |
|
string |
$searchmethod: |
|
API Tags:
| Return: | Set of records matching the keyword. |
String securityKey(
String
$action
)
|
|
Retrieve the security key of an action.
Returns the privilege required to perform a certain action. Usually, the privilege and the action are equal, but in m_securityMap, aliasses may be defined.
Parameters:
|
String |
$action: |
The action for which you want to determine the privilege. |
API Tags:
| Return: | The security privilege required to perform the action. |
Retrieve records from the database using a handy helper class. PHP5 only.
Parameters:
|
string |
$selector: |
(optional) selector string (will be used in the where clause) |
array selectDb(
[String
$selector = ""], [String
$order = ""], [array
$limit = ""], [array
$excludeList = ""], [array
$includeList = ""], [String
$mode = ""], [boolean
$distinct = false], [boolean
$ignoreDefaultFilters = false]
)
|
|
Retrieve records from the database.
Note that if 'atksearch' is set in the request vars, the search expressions are automatically added as extra where-clauses.
Parameters:
|
String |
$selector: |
Sql expression used as a where-condition, to retrieve only records that match the expression. |
|
String |
$order: |
The order in which to retrieve the records. |
|
array |
$limit: |
Array containing an "offset" and a "limit" to retrieve only part of the resultset. (Pass NULL or an empty string to retrieve all records.) |
|
array |
$excludeList: |
List of attributes to be excluded from the query. By default, the attributes that should be loaded are determined by the $mode parameter. Using $excludeList, you can explicitly exclude attributes. |
|
array |
$includeList: |
List of attributes to include in the query, regardless of the $mode parameter. |
|
String |
$mode: |
The action for which the selectDb is called. This param is used to determine which attributes to include in the query and which not to include. |
|
boolean |
$distinct: |
Perform a distinct selection (no duplicate records). Defaults to true. |
|
boolean |
$ignoreDefaultFilters: |
Ignore default node filters. |
API Tags:
| Return: | Array containing the retrieved records |
Information Tags:
| Todo: | Handling atksearch in this method is dirty, this should be controlable with parameters. |
Redefined in descendants as:
This function reads meta information from the database and initialises its attributes with the metadata.
This method should be called before rendering a form, if you want the sizes of all the inputs to match the fieldlengths from the database.
Redefined in descendants as:
void setAttributeOrder(
string
$name, int
$order
)
|
|
Sets an attributes order
Parameters:
|
string |
$name: |
The name of the attribute |
|
int |
$order: |
The order of the attribute |
void setDb(
string|atkDb
$db
)
|
|
Sets the database connection.
Parameters:
|
string|atkDb |
$db: |
database name or object |
API Tags:
void setDefaultColumn(
string
$name
)
|
|
Set default column name.
Parameters:
|
string |
$name: |
name default column name |
API Tags:
void setDefaultTab(
[String
$tab = "default"]
)
|
|
Set default tab being displayed in view/add/edit mode.
After calling this method, all attributes which are added after the method call without specification of tab will be placed on the default tab. This means you should use this method before you add any attributes to the node. If you accept the default name for the first tab ("default") you do not need to call this method.
Parameters:
|
String |
$tab: |
the name of the default tab |
void setDescriptorHandler(
&$handler, Object
$handler
)
|
|
Set descriptor handler.
Parameters:
|
Object |
$handler: |
The descriptor handler. |
|
|
&$handler: |
|
void setDescriptorTemplate(
String
$template
)
|
|
Sets the descriptor template for this node.
Parameters:
|
String |
$template: |
The descriptor template. |
void setEditableListAttributes(
array
$attrs
)
|
|
Sets the editable list attributes. If you supply this method with one or more string arguments, all arguments are collected in an array. Else the first parameter will be used.
Parameters:
|
array |
$attrs: |
list of attribute names |
void setEditFieldPrefix(
string
$prefix
)
|
|
Set the edit fieldprefix to use in atk
Parameters:
void setExtendedSearchAction(
string
$action
)
|
|
Set extended search action.
Parameters:
|
string |
$action: |
extended search action |
void setFeedback(
mixed
$action, int
$statusmask
)
|
|
Use this function to enable feedback for one or more actions.
When feedback is enabled, the action does not immediately return to the previous screen, but first displays a message to the user. (e.g. 'The record has been saved').
Parameters:
|
mixed |
$action: |
The action for which feedback is enabled. You can either pass one action or an array of actions. |
|
int |
$statusmask: |
The status(ses) for which feedback is enabled. If for example this is set to ACTION_FAILED, feedback is enabled only when the specified action failed. It is possible to specify more than one status by concatenating with '|'. |
void setFlags(
int
$flags
)
|
|
Set node flags.
Parameters:
API Tags:
void setIndex(
String
$attribname
)
|
|
Create an alphabetical index.
Any string- or textbased attribute can be used to create an alphabetical index in admin- and selectpages.
Parameters:
|
String |
$attribname: |
The name of the attribute for which to create the alphabetical index. |
void setLockMode(
int
$lockMode
)
|
|
Sets the lock mode.
Parameters:
|
int |
$lockMode: |
lock mode (atkLock::EXCLUSIVE, atkLock::SHARED) |
API Tags:
void setMRASelectionMode(
string
$mode
)
|
|
Sets the multi-record-action selection mode. Can either be MRA_MULTI_SELECT (default), MRA_SINGLE_SELECT or MRA_NO_SELECT.
Parameters:
|
string |
$mode: |
selection mode |
void setNumbering(
[mixed
$number = 1]
)
|
|
Sets numbering of the attributes to begin with the number that was passed to it, or defaults to 1.
Parameters:
|
mixed |
$number: |
the number that the first attribute begins with |
void setOrder(
String
$orderby
)
|
|
Set default sort order for the node.
Parameters:
|
String |
$orderby: |
Default order by. Can be an attribute name or a SQL expression. |
void setPriorityActions(
array
$actions
)
|
|
Sets the possible multi-record-priority actions.
Parameters:
|
array |
$actions: |
list of actions |
void setPriorityRange(
[int
$min = 1], [int
$max = 0]
)
|
|
Sets the priority range, for multi-record-priority actions.
Parameters:
|
int |
$min: |
the minimum priority |
|
int |
$max: |
the maximum priority (0 for auto => min + record count) |
void setSearchAction(
String
$action
)
|
|
Sets the search action.
The search action is the action that will be performed if only a single record is found after doing a certain search query.
You can specify more then 1 action. If the user isn't allowed to execute the 1st action, the 2nd action will be used, etc. If you want to pass multiple actions, just pass multiple params (function has a variable number of arguments).
Parameters:
|
String |
$action: |
The name of the action. |
Information Tags:
| Todo: | Using func_get_args is non-standard. It's cleaner to accept an array. |
void setSecurityAlias(
String
$alias
)
|
|
Set the security alias of a node.
By default a node has it's own set of privileges. With this method, the privileges of another node can be used. This is useful when you have a master/detail relationship, and people may manipulate details when they have privileges on the master node. Note: When setting an alias for the node, the node no longer has to have a registerNode call in the getNodes method in module.inc.
Parameters:
|
String |
$alias: |
The node (module.nodename) to set as a security alias for this node. |
void setTabIndex(
string
$tabname, int
$index, [string
$action = ""]
)
|
|
Set tab index
Parameters:
|
string |
$tabname: |
Tabname |
|
int |
$index: |
Index number |
|
string |
$action: |
Action name (add,edit,view) |
void setTable(
String
$tablename, [String
$seq = ""], [mixed
$db = NULL]
)
|
|
Set the table that the node should use.
Note: This should be called in the constructor of derived classes, after the base class constructor is called.
Parameters:
|
String |
$tablename: |
The name of the table to use. |
|
String |
$seq: |
The name of the sequence to use for autoincrement attributes. |
|
mixed |
$db: |
The database connection to use. If ommitted, this defaults to the default database connection. So in apps using only one database, it's not necessary to pass this parameter. You can pass either a connection (atkDb instance), or a string containing the name of the connection to use. |
void statusbar(
[boolean
$locked = FALSE]
)
|
|
Display a statusbar with a stacktrace and a help button.
Parameters:
|
boolean |
$locked: |
is the currently displayed item locked? |
API Tags:
| Deprecated: | Use the {statusbar} tag in templates instead. |
String tabulate(
String
$action, String
$content
)
|
|
Place a set of tabs around content.
Parameters:
|
String |
$action: |
The action for which the tabs are loaded. |
|
String |
$content: |
The content that is to be displayed within the tabset. |
API Tags:
| Return: | The complete tabset with content. |
String text(
mixed
$string, [String
$module = NULL], [String
$lng = ""], [String
$firstfallback = ""], [boolean
$nodefaulttext = false]
)
|
|
Translate using this node's module and type.
Parameters:
|
mixed |
$string: |
string or array of strings containing the name(s) of the string to return when an array of strings is passed, the second will be the fallback if the first one isn't found, and so forth |
|
String |
$module: |
module in which the language file should be looked for, defaults to core module with fallback to ATK |
|
String |
$lng: |
ISO 639-1 language code, defaults to config variable |
|
String |
$firstfallback: |
the first module to check as part of the fallback |
|
boolean |
$nodefaulttext: |
if true, then it doesn't return a default text when it can't find a translation |
API Tags:
| Return: | the string from the languagefile |
void trackChangesIfNeeded(
&$record, [array
$excludes = ''], [array
$includes = ''], array
$record
)
|
|
Called by updateDb to load the original record inside the record if the NF_TRACK_CHANGES flag is set.
NOTE: this method is made public because it's called from the update handler
Parameters:
|
array |
$record: |
|
|
array |
$excludes: |
|
|
array |
$includes: |
|
|
|
&$record: |
|
API Tags:
boolean updateDb(
&$record, [bool
$exectrigger = true], [array
$excludes = ""], [array
$includes = ""], array
$record
)
|
|
Update a record in the database.
The record should already exist in the database, or this method will fail.
NOTE: Does not commit your transaction! If you are using a database that uses transactions you will need to call 'atkGetDb()->commit()' manually.
Parameters:
|
array |
$record: |
The record to update in the database. |
|
bool |
$exectrigger: |
wether to execute the pre/post update triggers |
|
array |
$excludes: |
exclude list (these attribute will *not* be updated) |
|
array |
$includes: |
include list (only these attributes will be updated) |
|
|
&$record: |
|
API Tags:
| Return: | True if succesful, false if not. |
Redefined in descendants as:
array updateRecord(
[array
$vars = ""], [array
$includes = NULL], [array
$excludes = NULL], [array
$postedOnly = false]
)
|
|
Parse a set of url vars into a valid record structure.
When attributes are posted in a formposting, the values may not be valid yet. After posting, a call to updateRecord should be made to translate the html values into the internal values that the attributes work with.
Parameters:
|
array |
$vars: |
The request variables that were posted from a form. |
|
array |
$includes: |
Only fetch the value for these attributes. |
|
array |
$excludes: |
Don't fetch the value for these attributes. |
|
array |
$postedOnly: |
Only fetch the value for attributes that have really been posted. |
API Tags:
void validate(
&$record, String
$mode, [array
$ignoreList = array()], array
$record
)
|
|
Validates a record.
Validates unique fields, required fields, dataformat etc.
Parameters:
|
array |
$record: |
The record to validate |
|
String |
$mode: |
The mode for which validation is performed ('add' or 'update') |
|
array |
$ignoreList: |
The list of attributes that should not be validated |
|
|
&$record: |
|
API Tags:
| Internal: | This method instantiates the node's validator object, and delegates validation to that object. |
Redefined in descendants as:
String validateFilter(
String
$filter
)
|
|
Validates if a filter is valid for this node.
A filter is considered valid if it doesn't contain any fields that are not part of the node.
Why isn't this used more often???
Parameters:
|
String |
$filter: |
The filter expression to validate |
API Tags:
| Return: | Returns $filter if the filter is valid or a empty string if not. |
array viewArray(
String
$mode, array
$record, [bool
$injectSections = true]
)
|
|
Function outputs an array with view fields. For each field the array contains the name, view HTML code etc.
Parameters:
|
String |
$mode: |
The edit mode ("view") |
|
array |
$record: |
The record currently being viewed. |
|
bool |
$injectSections: |
Inject sections? |
API Tags:
| Return: | List of edit fields (per field ( name, html, obligatory, error, label }) |
Information Tags:
| Todo: | The viewArray method should use a set of classes to build the form, instead of an array with an overly complex structure. |
Add the listeners for the current node
A listener can be defined either by placing an instantiated object or the full location in atkimport style notation, in a global array called $g_nodeListeners (useful for example for adding listeners to nodes from another module's module.inc file. in module.inc files, $listeners can be used to add listeners to a node.
API Tags:
boolean _storeAttributes(
array
$storelist,
&$record, String
$mode, array
$record
)
|
|
Call the store() method on a list of attributes.
Parameters:
|
array |
$storelist: |
The list of attributes for which the store() method should be called. |
|
array |
$record: |
The master record being stored. |
|
String |
$mode: |
The storage mode ("add", "copy" or "update") |
|
|
&$record: |
|
API Tags:
| Return: | True if succesful, false if not. |
| Access: | private |
String representation for this node (PHP5 only).
API Tags: