You are here

function nodejs_actions_node_action in Node.js integration 7

Node object action callback.

Parameters

object $node:

array $context:

File

nodejs_actions/nodejs_actions.module, line 61

Code

function nodejs_actions_node_action($node, $context = array()) {
  if ($action = nodejs_actions_get_action($context)) {
    $subject = t('Node %action.', array(
      '%action' => $action,
    ));
    $link = l($node->title, 'node/' . $node->nid);
    $body = t('The node !link was %action.', array(
      '!link' => $link,
      '%action' => $action,
    ));
    nodejs_actions_enqueue_message($subject, $body);
  }
}