Abstraciton of target actions.
Class Action( [prompt],[al] )
prompt | A Textual prompt that should be rendered in skins. Works also as a logical name for this entity. |
al | The authorization level needed to see this action. Pass nil to allow everyone to see. |
String masks can be configured using the $eid marker in case the action is applied to single entities.
If the action is called back on a entity, then the mask function will receive an eid parameter.
Rendering actions when the Nest authorization level is less privileged than then required al will result in an empty string.
The prompt parameter is a string that can be used as a title, or as a content for several rendering purposes.
Methods | |
allowed | Check if a logged-in user can see this action. |
render | Renders this action. |
Check if a logged-in user can see this action.
allowed()
Return | True if the user or visitor can see this action. |
Uses Nest.auth_level comparing it against the Action.level set at creation
Renders this action.
render( [eid] )
eid | The Entity ID that refers to this action (if this is a item-action) |
Return | A string that represents the action on the output page. |
This must be re-implemented by subclasses.