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().

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.

End of "defgroup actions".

File

drupal/core/modules/action/action.module, line 8
This is the Actions module for executing stored actions.

Functions

Namesort descending Location Description
actions_do drupal/core/modules/action/action.module Performs a given list of actions by executing their callback functions.
action_action_info drupal/core/modules/action/action.module Implements hook_action_info().
action_message_action drupal/core/modules/action/action.module Sends a message to the current user's screen.
action_send_email_action drupal/core/modules/action/action.module Sends an e-mail message.
comment_publish_action drupal/core/modules/comment/comment.module Publishes a comment.
comment_save_action drupal/core/modules/comment/comment.module Saves a comment.
comment_unpublish_action drupal/core/modules/comment/comment.module Unpublishes a comment.
comment_unpublish_by_keyword_action drupal/core/modules/comment/comment.module Unpublishes a comment if it contains certain keywords.
hook_action_delete drupal/core/modules/action/action.api.php Executes code after an action is deleted.
hook_action_info drupal/core/modules/action/action.api.php Declares information about actions.
hook_action_info_alter drupal/core/modules/action/action.api.php Alters the actions declared by another module.
node_assign_owner_action drupal/core/modules/node/node.module Assigns ownership of a node to a user.
node_make_sticky_action drupal/core/modules/node/node.module Sets the sticky-at-top-of-list property of a node to 1.
node_make_unsticky_action drupal/core/modules/node/node.module Sets the sticky-at-top-of-list property of a node to 0.
node_promote_action drupal/core/modules/node/node.module Sets the promote property of a node to 1.
node_publish_action drupal/core/modules/node/node.module Sets the status of a node to 1 (published).
node_save_action drupal/core/modules/node/node.module Saves a node.
node_unpromote_action drupal/core/modules/node/node.module Sets the promote property of a node to 0.
node_unpublish_action drupal/core/modules/node/node.module Sets the status of a node to 0 (unpublished).
node_unpublish_by_keyword_action drupal/core/modules/node/node.module Unpublishes a node containing certain keywords.
user_block_user_action drupal/core/modules/user/user.module Blocks the current user.