function nodejs_broadcast_message in Node.js integration 8
Same name and namespace in other branches
- 6 nodejs.module \nodejs_broadcast_message()
- 7 nodejs.module \nodejs_broadcast_message()
Broadcast a message to all clients.
Parameters
string $subject:
string $body:
1 call to nodejs_broadcast_message()
- BroadcastForm::submitForm in nodejs_notify/
src/ Form/ BroadcastForm.php - Form submission handler.
1 string reference to 'nodejs_broadcast_message'
- nodejs_drush_command in ./
nodejs.drush.inc - Implements hook_drush_command().
File
- ./
nodejs.module, line 176
Code
function nodejs_broadcast_message($subject, $body) {
$message = (object) array(
'broadcast' => TRUE,
'data' => (object) array(
'subject' => $subject,
'body' => $body,
),
'channel' => 'nodejs_notify',
);
nodejs_enqueue_message($message);
}