You are here

function nodejs_remove_channel in Node.js integration 8

Remove a channel from the Node.js server.

Parameters

channel:

Return value

boolean

File

./nodejs.module, line 411

Code

function nodejs_remove_channel($channel) {

  // Http request went ok. Process Node.js server response.
  if ($node_response = nodejs_get_nodejs()
    ->removeChannel($channel)) {
    if ($node_response->status == 'success') {
      return TRUE;
    }
    else {
      \Drupal::logger('nodejs')
        ->error(t('Error removing channel from the Node.js server. Server response: %error', array(
        '%error' => $node_response->error,
      )));
      return FALSE;
    }
  }
  else {
    return FALSE;
  }
}