You are here

nodejs_watchdog.module in Node.js integration 8

Same filename and directory in other branches
  1. 7 nodejs_watchdog/nodejs_watchdog.module

File

nodejs_watchdog/nodejs_watchdog.module
View source
<?php

/**
 * Implements hook_page_attachments_alter().
 */
function nodejs_watchdog_page_attachments_alter(array &$attachments) {
  $route_name = \Drupal::service('current_route_match')
    ->getRouteName();
  if ($route_name == 'dblog.overview') {
    nodejs_send_content_channel_token('watchdog_dblog');
    $attachments['#attached']['library'][] = 'nodejs_watchdog/nodejs_watchdog';
  }
}