function nodejs_check_channel in Node.js integration 8
Checks whether a channel exists on the Node.js server.
Parameters
channel:
Return value
boolean TRUE if the specified channel exists on the Node.js server, FALSE otherwise.
File
- ./
nodejs.module, line 388
Code
function nodejs_check_channel($channel) {
// Http request went ok. Process Node.js server response.
if ($node_response = nodejs_get_nodejs()
->checkChannel($channel)) {
if ($node_response->status == 'success') {
return $node_response->result;
}
else {
\Drupal::logger('nodejs')
->error(t('Error checking channel on the Node.js server. Server response: %error', array(
'%error' => $node_response->error,
)));
return FALSE;
}
}
else {
return FALSE;
}
}