time_field-8.x-1.13/time_field.module
time_field.module
<?php
/**
* @file
* Contains time_field.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function time_field_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the time_field module.
case 'help.page.time_field':
$output = '';
$output .= '<h3>' . t('What "Time field" module provides?') . '</h3>';
$output .= '<p>' . t('This module provides Time and TimeRange fields also corresponding widgets and formatters.') . '</p>';
$output .= '<h3>' . t('How it saves data?') . '</h3>';
$output .= '<p>' . t('Time field module saves time data as integers number of seconds passed through midnight.') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_preprocess_form_element__new_storage_type().
*/
function time_field_preprocess_form_element__new_storage_type(&$variables) {
$variables['#attached']['library'][] = 'time_field/field-icon-time';
}
