4.9.1Class Action

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
allowedCheck if a logged-in user can see this action.
renderRenders this action.

Methods

allowed

Check if a logged-in user can see this action.

allowed()
ReturnTrue if the user or visitor can see this action.

Uses Nest.auth_level comparing it against the Action.level set at creation

render

Renders this action.

render( [eid] )
eid The Entity ID that refers to this action (if this is a item-action)
ReturnA string that represents the action on the output page.

This must be re-implemented by subclasses.

Made with http://www.falconpl.org