duration_field.module in Duration Field 8
File
duration_field.module
View source
<?php
use Drupal\Core\Routing\RouteMatchInterface;
function duration_field_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.duration_field':
return t('<p>This module creates a new Form API form element of type duration, as well as a Field API field of type duration. A duration is a time period, for which the granularity can be adjusted to collect any or all of years, months, days, hours, minutes and seconds. This module makes no assumptions as to the type of duration a user would want to collect, so as such, a user could choose to collect years and seconds only, if they wish, though generally that wouldn\'t make sense.</p>
<p>See the <a href=":project_page">project page on Drupal.org</a> for more details.</p>', [
':project_page' => 'https://www.drupal.org/project/duration_field',
]);
}
}