christmas_lights.module in Christmas Lights 8
Same filename and directory in other branches
Main file for the christmas_lights module.
File
christmas_lights.moduleView source
<?php
/**
* @file
* Main file for the christmas_lights module.
*/
/**
* Implements hook_page_bottom().
*/
function christmas_lights_page_bottom(array &$page_bottom) {
$settings = \Drupal::config('christmas_lights.settings')
->get();
if (!$settings['enabled']) {
return;
}
$time = Drupal::time()
->getRequestTime();
if ($time >= $settings['start'] && $time <= $settings['end']) {
$page_bottom['module']['#markup'] = '<div id="christmas-lights"></div>';
$page_bottom['#attached']['library'][] = 'christmas_lights/christmas_lights';
}
}
Functions
Name | Description |
---|---|
christmas_lights_page_bottom | Implements hook_page_bottom(). |