You are here

nodejs_notify.module in Node.js integration 8

File

nodejs_notify/nodejs_notify.module
View source
<?php

use Drupal\Core\Asset\AttachedAssetsInterface;

/**
 * Implements hook_nodejs_handlers_info().
 */
function nodejs_notify_nodejs_handlers_info() {
  return [
    'nodejs_notify/notify',
  ];
}

/**
 * Implements hook_js_settings_alter().
 */
function nodejs_notify_js_settings_alter(array &$settings, AttachedAssetsInterface $assets) {
  $settings['nodejs_notify']['notification_time'] = \Drupal::config('nodejs_notify.settings')
    ->get('notification_lifetime_seconds');
}