Constructor of atkController
API Tags:
String accessDeniedPage(
)
|
|
Render a generic access denied page.
API Tags:
| Return: | A complete html page with generic access denied message. |
string actionPageTitle(
)
|
|
Return the title to be show on top of an Action Page
API Tags:
Redefined in descendants as:
-
atkWizard::actionPageTitle()
: Return the title to be show on top of an Action Page. This is an override of the atkController::actionPageTitle function.
object &createInstance(
string
$controller
)
|
|
Return the one and only instance of the class
Parameters:
|
string |
$controller: |
The class of the controller to instanciate |
void dispatch(
array
$postvars, [integer
$flags = NULL]
)
|
|
This method is a wrapper for calling the node dispatch function Therefore each node can define it's own dispatch function The default dispatch function of the atkNode will call the handleRequest function of the controller
Parameters:
|
array |
$postvars: |
|
|
integer |
$flags: |
|
string dispatchUrl(
[
$params = array()], [string
$atknodetype = ""], [string
$file = ""], string
$params:
)
|
|
Generate a dispatch menu URL for use with nodes and their specific actions.
Parameters:
|
string |
$params:: |
A key/value array with extra options for the url |
|
string |
$atknodetype: |
The atknodetype (modulename.nodename) |
|
string |
$file: |
The php file to use for dispatching, defaults to dispatch.php |
|
|
$params: |
|
API Tags:
| Return: | url for the node with the action |
String feedbackUrl(
String
$action, int
$status, [array
$record = ""], [String
$message = ""], [integer
$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. |
|
integer |
$levelskip: |
The number of levels to skip |
API Tags:
| Return: | The feedback url. |
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. |
HTML getButton(
String
$action, [Bool
$default = false], [
$label = null]
)
|
|
Create a button.
Parameters:
|
String |
$action: |
|
|
Bool |
$default: |
Add the atkdefaultbutton class? |
|
|
$label: |
|
HTML getDialogButton(
String
$action, [String
$label = null], [String
$url = null], [array
$extraParams = array()]
)
|
|
Create a dialog button.
Parameters:
|
String |
$action: |
The action ('save' or 'cancel') |
|
String |
$label: |
The label for this button |
|
String |
$url: |
|
|
array |
$extraParams: |
|
void 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. |
Redefined in descendants as:
Return m_hidden_vars array.
string getHiddenVarsString(
)
|
|
Return m_hidden_vars as html input types.
Return the html title for the content frame. Default we show node name and action.
API Tags:
Return the one and only instance of the class
Return module name of controller
API Tags:
Return controller name
API Tags:
Get m_node variable or if not set make instance of atkNode class (determined by using the postvars)
API Tags:
object reference &getPage(
)
|
|
Return a reference to the atkPage object. This object is used to render output as an html page.
Return php_file. If not set, returns theme-level dispatchfile, if not set either, return (sanitized) PHP_SELF
API Tags:
| Return: | The name of the file to which subsequent requests should be posted. |
Return the setting for returning output
Get the ui instance for drawing and templating purposes.
API Tags:
| Return: | An atkUi instance for drawing and templating. |
void handleRequest(
array
$postvars, [string
$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. |
|
string |
$flags: |
Render flags (see class atkPage). |
Redefined in descendants as:
-
atkWizard::handleRequest()
: Main execution function (start of the wizard). Every page load will go through this function. This function overrides atkController::handleRequest but it always calls its parent in the end.
mixed invoke(
String
$methodname
)
|
|
Generic method invoker (copied from class.atkactionhandler.inc).
Controller methods invoked with invoke() instead of directly, have a major advantage: the controller automatically searches for an override in the node. For example, If a controller calls its getSomething() method using the invoke method, the node may implement its own version of getSomething() and that method will then be called instead of the original. The controller is passed by reference to the override function as first parameter, so if necessary, you can call the original method from inside the override.
The function accepts a variable number of parameters. Any parameter that you would pass to the method, can be passed to invoke(), and invoke() will pass the parameters on to the method.
There is one limitation: you can't pass parameters by reference if you use invoke().
Example:
$controller->invoke("dispatch", $postvars, $fullpage);
This will call dispatch(&$handler, $postvars, $flags) on your node class if present, or dispatch($postvars, $flags) in the handler if the node has no override.
Parameters:
|
String |
$methodname: |
The name of the method to call. |
API Tags:
| Return: | The method returns the return value of the invoked method. |
void loadDispatchPage(
array
$postvars
)
|
|
Does the actual loading of the dispatch page And adds it to the page for the dispatch() method to render.
Parameters:
|
array |
$postvars: |
The request variables for the node. |
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. |
void setHiddenVar(
string
$name, string
$value
)
|
|
Set Key/value pair in m_hidden_vars array. Saved pairs are send as post or get vars in the next page load
Parameters:
|
string |
$name: |
the reference key |
|
string |
$value: |
the actual value |
void setNode(
&$node, object
$node
)
|
|
Set m_node variable of this class
Parameters:
void setPhpFile(
string
$phpfile
)
|
|
Set php_file member variable
Parameters:
void setReturnOutput(
bool
$returnOutput
)
|
|
Configure if you want the html returned or leave it up to atkOutput.
Parameters:
instance &_instance(
[string
$class = ""], [boolean
$replace = false]
)
|
|
Create instance of controller (determined by class variable) if not yet created, return instance of atkcontroller
Parameters:
|
string |
$class: |
|
|
boolean |
$replace: |
|
API Tags:
| Return: | of controller |
| Access: | private |