You are here

function nodejs_actions_enqueue_message in Node.js integration 7

Same name and namespace in other branches
  1. 6 nodejs_actions/nodejs_actions.module \nodejs_actions_enqueue_message()

Helper function for enqueueing 'nodejs_notify' channel messages.

Parameters

mixed $subject:

mixed $body:

3 calls to nodejs_actions_enqueue_message()
nodejs_actions_comment_action in nodejs_actions/nodejs_actions.module
Comment object action callback.
nodejs_actions_node_action in nodejs_actions/nodejs_actions.module
Node object action callback.
nodejs_actions_user_action in nodejs_actions/nodejs_actions.module
User object action callback.

File

nodejs_actions/nodejs_actions.module, line 106

Code

function nodejs_actions_enqueue_message($subject, $body) {
  $message = (object) array(
    'broadcast' => TRUE,
    'data' => (object) array(
      'subject' => $subject,
      'body' => $body,
    ),
    'channel' => 'nodejs_notify',
  );
  nodejs_enqueue_message($message);
}