Functions that perform an action on a certain system object.
Action functions are declared by modules by implementing hook_action_info(). Modules can run action functions to run by calling action_execute().
Each action function takes two arguments:
- $entity: The object that the action acts on, such as a node, comment, or user.
- $context: An array of information passed by reference that includes
information about the current action execution, including the following
keys:
- action_name: The name of the action being executed.
- action_info: The definition of the action being executed, as provided by hook_action_info().
- redirect: A path to which the user should be redirected after the action is complete. This can be used to direct the user to a configuration form to configure the action or ask for confirmation.
End of "defgroup actions".
File
- includes/
actions.inc, line 8 - This is the actions engine for executing stored actions.
Functions
Name | Location | Description |
---|---|---|
actions_execute |
includes/ |
Executes a single action. |
comment_publish_action |
modules/ |
Publishes a comment. |
comment_unpublish_action |
modules/ |
Unpublishes a comment. |
file_delete_action |
modules/ |
Queues a file for deletion. |
hook_action_info |
modules/ |
Declares information about actions. |
hook_action_info_alter |
modules/ |
Alters the actions declared by another module. |
node_delete_action |
modules/ |
Queues a node for deletion. |
node_make_sticky_action |
modules/ |
Sets the sticky-at-top-of-list property of a node to 1. |
node_make_unsticky_action |
modules/ |
Sets the sticky-at-top-of-list property of a node to 0. |
node_promote_action |
modules/ |
Sets the promote property of a node to 1. |
node_publish_action |
modules/ |
Sets the status of a node to 1 (published). |
node_unpromote_action |
modules/ |
Sets the promote property of a node to 0. |
node_unpublish_action |
modules/ |
Sets the status of a node to 0 (unpublished). |
user_add_role_action |
modules/ |
Adds a role to a user account. |
user_block_user_action |
modules/ |
Blocks a specific user account. |
user_cancel_user_action |
modules/ |
Queues a specific user account for cancellation. |
user_remove_role_action |
modules/ |
Removes a role from a user account. |
user_unblock_user_action |
modules/ |
Unblocks a specific user account. |