Class: atkUI
Source Location: /ui/class.atkui.inc
Class atkUI
Property Summary
| Smarty |
$m_smarty |
Smarty instance, initialised by constructor |
Method Summary
| atkUI |
atkUI() |
atkUi constructor, initialises Smarty and atkTheme instance |
| String |
getWizardTitle() |
This function returns a suitable title text for an Wizardpanel. |
| String |
nodeTitle() |
This function returns a suitable title text for an action. |
| String |
render() |
Renders the given template. |
| void |
renderBox() |
Renders a box with Smarty template. |
| string |
renderPhp() |
Render PHP-based template. |
| String |
stylePath() |
This function returns a complete themed path for a given stylesheet. |
| String |
templatePath() |
This function returns a complete themed path for a given template. |
| String |
title() |
Return the title to render |
Properties
Smarty instance, initialised by constructor
API Tags:
atkTheme instance, initialised by constructor
API Tags:
Methods
atkUi constructor, initialises Smarty and atkTheme instance
get a singleton instance of the atkUi class.
String getWizardTitle(
String
$wizard, String
$panel, [String
$action = NULL]
)
|
|
This function returns a suitable title text for an Wizardpanel.
Example: echo $ui->title("departmentwizard", "employee", "add"); might return: 'Departmen wizard - Add employees - Step 2 of 3'
Parameters:
|
String |
$wizard: |
the wizard object |
|
String |
$panel: |
the panel object |
|
String |
$action: |
the atk action that we are trying execute in the panel |
API Tags:
| Return: | the title for this wizardpanel |
String nodeTitle(
atkNode
$node, [String
$action = NULL], [bool
$actiononly = false]
)
|
|
This function returns a suitable title text for an action.
Example: echo $ui->title("users", "employee", "edit"); might return: 'Edit an existing employee'
Parameters:
|
atkNode |
$node: |
the node to get the title from |
|
String |
$action: |
the action that we are trying to find a title for |
|
bool |
$actiononly: |
wether or not to return a name of the node if we couldn't find a specific title |
API Tags:
| Return: | the title for the action |
String render(
String
$name, [array
$vars = array()], [String
$module = ""]
)
|
|
Renders the given template.
If the name ends with ".php" PHP will be used to render the template. If the name ends with ".tpl" and a file with the extension ".tpl.php" exists PHP will be used, otherwise Smarty will be used to render the template.
Parameters:
|
String |
$name: |
the name of the template to render |
|
array |
$vars: |
the variables with which to render the template |
|
String |
$module: |
the name of the module requesting to render a template |
API Tags:
| Return: | rendered template |
| Access: | public |
String renderAction(
String
$action, array
$vars, [string
$module = ""]
)
|
|
Renders action templates
Currently only the view action is implemented
Parameters:
|
String |
$action: |
the action for which to render the template |
|
array |
$vars: |
the template variables |
|
string |
$module: |
the name of the module requesting to render a template |
API Tags:
| Return: | the rendered template |
void renderBox(
array
$vars, [string
$name = ""], [string
$module = ""]
)
|
|
Renders a box with Smarty template.
Call with a $name variable to provide a better default than "box.tpl".
For instance, calling renderBox($smartyvars, "menu") will make it search for a menu.tpl first and use that if it's available, otherwise it will just use box.tpl
Parameters:
|
array |
$vars: |
the variables for the template |
|
string |
$name: |
The name of the template |
|
string |
$module: |
the name of the module requesting to render a template |
string renderDialog(
array
$vars, [string
$module = ""]
)
|
|
Renders the insides of a dialog.
Parameters:
|
array |
$vars: |
template variables |
|
string |
$module: |
the name of the module requesting to render a template |
API Tags:
void renderList(
String
$action, array
$vars, [string
$module = ""]
)
|
|
Renders a list template
Parameters:
|
String |
$action: |
not used (deprecated?) |
|
array |
$vars: |
the variables with which to parse the list template |
|
string |
$module: |
the name of the module requesting to render a template |
string renderPhp(
string
$path, array
$vars
)
|
|
Render PHP-based template.
Parameters:
|
string |
$path: |
template path |
|
array |
$vars: |
template variables |
API Tags:
| Return: | rendered template |
| Access: | private |
string renderSmarty(
string
$path, array
$vars
)
|
|
Render Smarty-based template.
Parameters:
|
string |
$path: |
template path |
|
array |
$vars: |
template variables |
API Tags:
| Return: | rendered template |
| Access: | private |
String renderTabs(
array
$vars, [string
$module = ""]
)
|
|
Renders a tabulated template
Registers some scriptcode too when the tabtype is set to dhtml
Parameters:
|
array |
$vars: |
the variables with which to render the template |
|
string |
$module: |
the name of the module requesting to render a template |
API Tags:
| Return: | the rendered template |
String renderTop(
array
$vars, [string
$module = ""]
)
|
|
Renders top template
Parameters:
|
array |
$vars: |
the variables for the template |
|
string |
$module: |
the name of the module requesting to render a template |
API Tags:
| Return: | with the rendered box |
| Deprecated: | Use renderBox($vars, "top") instead |
String stylePath(
String
$style, [String
$module = ""]
)
|
|
This function returns a complete themed path for a given stylesheet.
This is a convenience method, which calls the stylePath method on the theme instance.
Parameters:
|
String |
$style: |
The filename (without path) of the stylesheet for which you want to complete the path. |
|
String |
$module: |
the name of the module requesting the style path |
API Tags:
| Return: | the path of the style |
String templatePath(
String
$template, [String
$module = ""]
)
|
|
This function returns a complete themed path for a given template.
This is a convenience method, which calls the tplPath method on the theme instance. However, if the template name contains a '/', we assume the full template path is already given and we simply return it.
Parameters:
|
String |
$template: |
The filename (without path) of the template for which you want to complete the path. |
|
String |
$module: |
The name of the module requesting to render a template |
API Tags:
| Return: | the template path |
String title(
String
$module, String
$nodetype, [String
$action = null], [bool
$actiononly = false]
)
|
|
Return the title to render
Parameters:
|
String |
$module: |
the module in which to look |
|
String |
$nodetype: |
the nodetype of the action |
|
String |
$action: |
the action that we are trying to find a title for |
|
bool |
$actiononly: |
wether or not to return a name of the node if we couldn't find a specific title |
API Tags:
| Return: | the title for the action |