TKAction Class Reference
[Core Classes]

Base class for all Toolkit actions. More...

Inheritance diagram for TKAction:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 getInvocation ()
 Called when rendering a component.

Protected Member Functions

 addExtraCSS ($slot, $css)
 Add extra CSS to page.
 addExtraJS ($slot, $js)
 Add extra JavaScript to page.
 addHiddenForm ($name, $form)
 Add a hidden form to the page.

Static Protected Member Functions

static convertAction ($evt)
 Converts XML to an action.


Detailed Description

Base class for all Toolkit actions.

For internal use only.

Extend this class to create a new action. See Guide to Events and Actions for more information on creating actions.

Definition at line 12 of file TKAction.php5.


Member Function Documentation

TKAction::addExtraCSS ( slot,
css 
) [protected]

Add extra CSS to page.

For internal use only.

Parameters:
$slot [string]: unique key to identify block of CSS
$css [string]: CSS to add

Definition at line 34 of file TKAction.php5.

References Toolkit::globalAddExtraCSS().

TKAction::addExtraJS ( slot,
js 
) [protected]

Add extra JavaScript to page.

For internal use only.

Parameters:
$slot [string]: unique key to identify block of JavaScript
$js [string]: JavaScript to add

Definition at line 45 of file TKAction.php5.

References Toolkit::globalAddExtraJS().

Referenced by TKToggleAction::__construct(), TKSelectAction::getInvocation(), and TKAJAXRequest::getInvocation().

TKAction::addHiddenForm ( name,
form 
) [protected]

Add a hidden form to the page.

For internal use only.

Parameters:
$name [string]: name of form (usually same as the form's name attribute)
$form [array]: array of attribute => value pairs constituting form

Definition at line 56 of file TKAction.php5.

References Toolkit::globalAddHiddenForm().

Referenced by TKPostAction::getInvocation().

static TKAction::convertAction ( evt  )  [static, protected]

Converts XML to an action.

For internal use only.

When an action is named in an <event> block, it must be converted independently of the normal mechanism. This function takes care of that. It should be called from an action's createFromXML() method.

Parameters:
$evt [array]: event block XML
Returns:
[TKAction] action object

Definition at line 71 of file TKAction.php5.

TKAction::getInvocation (  )  [abstract]

Called when rendering a component.

For internal use only.

When a component is rendered, this is called on each action that is associated with an event. The method should return JavaScript suitable for being embedded in an HTML tag. The method may also optionally add JavaScript to the document if necessary (see addExtraJS()).

Reimplemented in TKAJAXRequest, TKAlertAction, TKChangeStyleAction, TKConfirmAction, TKCustomAction, TKDisableAction, TKEmitAction, TKEnableAction, TKGetAction, TKLinkAction, TKPopupAction, TKPostAction, TKSelectAction, TKSubmitAction, TKSwitchTabAction, TKToggleAction, and TKTreeAction.


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:06:52 2010 for Common by  doxygen 1.5.6