You are here

protected function NodeActivityActionHandler::messages in Activity 7

Return an array of message types.

Overrides ActivityActionHandler::messages

1 call to NodeActivityActionHandler::messages()
CommentActivityActionHandler::messages in ./activity_action_handlers.inc
Return an array of message types.
1 method overrides NodeActivityActionHandler::messages()
CommentActivityActionHandler::messages in ./activity_action_handlers.inc
Return an array of message types.

File

./activity_action_handlers.inc, line 524

Class

NodeActivityActionHandler
Activity handler for node module.

Code

protected function messages() {
  $messages = parent::messages();
  $messages['node'] = array(
    'title' => 'Node Author',
    'description' => 'Author of the node or the user who updated the node',
  );
  if ($this->type == 'node_update') {

    // If node->uid == $GLOBALS['user']->uid, this message template will be
    // used instead of $messages['node'].
    // This key 'current_user' is a fake one, and its existance is handled in
    // getUid() method.
    $messages['current_user'] = array(
      'title' => 'Updating User',
      'description' => 'The user who actually updated the node',
    );
  }
  elseif ($this->type == 'node_view') {
    $messages['current_user'] = array(
      'title' => 'Current User',
      'description' => 'The user viewing the node',
    );
  }
  return $messages;
}