Actions
Functions that perform an action on a certain system object.
Action functions are declared by modules by implementing hook_action_info(). Modules can cause action functions to run by calling actions_do(), and trigger.module provides a user interface that lets administrators define events that cause action functions to run.
Each action function takes two to four arguments:
- $entity: The object that the action acts on, such as a node, comment, or user.
- $context: Array of additional information about what triggered the action.
- $a1, $a2: Optional additional information, which can be passed into actions_do() and will be passed along to the action function.
File
-
includes/
actions.inc, line 8
Functions
Title Sort descending | File name | Summary |
---|---|---|
actions_do | includes/ |
Performs a given list of actions by executing their callback functions. |
comment_publish_action | modules/ |
Publishes a comment. |
comment_save_action | modules/ |
Saves a comment. |
comment_unpublish_action | modules/ |
Unpublishes a comment. |
comment_unpublish_by_keyword_action | modules/ |
Unpublishes a comment if it contains certain keywords. |
hook_action_info | modules/ |
Declares information about actions. |
node_assign_owner_action | modules/ |
Assigns ownership of a node to a user. |
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_save_action | modules/ |
Saves a node. |
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). |
node_unpublish_by_keyword_action | modules/ |
Unpublishes a node containing certain keywords. |
system_block_ip_action | modules/ |
Blocks the current user's IP address. |
system_goto_action | modules/ |
Redirects to a different URL. |
system_message_action | modules/ |
Sends a message to the current user's screen. |
system_send_email_action | modules/ |
Sends an e-mail message. |
user_block_user_action | modules/ |
Blocks a specific user or the current user, if one is not specified. |
user_unblock_user_action | modules/ |
Unblocks a specific user or the current user, if one is not specified. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.