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
- core/
includes/ actions.inc, line 7 - This is the actions engine for executing stored actions.
Functions
Name | Location | Description |
---|---|---|
actions_execute |
core/ |
Executes a single action. |
comment_publish_action |
core/ |
Publishes a comment. |
comment_unpublish_action |
core/ |
Unpublishes a comment. |
file_delete_action |
core/ |
Queues a file for deletion. |
hook_action_info |
core/ |
Declares information about actions. |
hook_action_info_alter |
core/ |
Alters the actions declared by another module. |
node_delete_action |
core/ |
Queues a node for deletion. |
node_make_sticky_action |
core/ |
Sets the sticky-at-top-of-list property of a node to 1. |
node_make_unsticky_action |
core/ |
Sets the sticky-at-top-of-list property of a node to 0. |
node_promote_action |
core/ |
Sets the promote property of a node to 1. |
node_publish_action |
core/ |
Sets the status of a node to 1 (published). |
node_unpromote_action |
core/ |
Sets the promote property of a node to 0. |
node_unpublish_action |
core/ |
Sets the status of a node to 0 (unpublished). |
user_add_role_action |
core/ |
Adds a role to a user account. |
user_block_user_action |
core/ |
Blocks a specific user account. |
user_cancel_user_action |
core/ |
Queues a specific user account for cancellation. |
user_remove_role_action |
core/ |
Removes a role from a user account. |
user_unblock_user_action |
core/ |
Unblocks a specific user account. |