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

Namesort descending Location Description
actions_execute includes/actions.inc Executes a single action.
comment_publish_action modules/comment/comment.module Publishes a comment.
comment_unpublish_action modules/comment/comment.module Unpublishes a comment.
file_delete_action modules/file/file.actions.inc Queues a file for deletion.
hook_action_info modules/system/system.api.php Declares information about actions.
hook_action_info_alter modules/system/system.api.php Alters the actions declared by another module.
node_delete_action modules/node/node.actions.inc Queues a node for deletion.
node_make_sticky_action modules/node/node.actions.inc Sets the sticky-at-top-of-list property of a node to 1.
node_make_unsticky_action modules/node/node.actions.inc Sets the sticky-at-top-of-list property of a node to 0.
node_promote_action modules/node/node.actions.inc Sets the promote property of a node to 1.
node_publish_action modules/node/node.actions.inc Sets the status of a node to 1 (published).
node_unpromote_action modules/node/node.actions.inc Sets the promote property of a node to 0.
node_unpublish_action modules/node/node.actions.inc Sets the status of a node to 0 (unpublished).
user_add_role_action modules/user/user.actions.inc Adds a role to a user account.
user_block_user_action modules/user/user.actions.inc Blocks a specific user account.
user_cancel_user_action modules/user/user.actions.inc Queues a specific user account for cancellation.
user_remove_role_action modules/user/user.actions.inc Removes a role from a user account.
user_unblock_user_action modules/user/user.actions.inc Unblocks a specific user account.