Skip to content
Snippets Groups Projects
Commit 3b5a0889 authored by Noorul Shameera's avatar Noorul Shameera Committed by Prashant Chauhan
Browse files

Issue #3337580 by Charchil Khandelwal, noorulshameera, himanshu_jhaloya: Implement hook_help()

parent dbb93b3e
Branches
Tags
No related merge requests found
......@@ -3,6 +3,8 @@ type: module
description: DateTime picker form element using the Bootstrap datetimepicker library.
core_version_requirement: ^8 || ^9 || ^10
configure: bootstrap_datetime_picker.settings
dependencies:
- drupal:datetime
......@@ -2,12 +2,35 @@
/**
* @file
* Empty module file.
* Module file.
*/
use Drupal\Core\Datetime\DrupalDateTime;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function bootstrap_datetime_picker_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.bootstrap_datetime_picker':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('This module provides Bootstrap DateTime picker using library <a href=":library">https://github.com/Eonasdan/bootstrap-datetimepicker</a>.',
[
':library' => 'https://github.com/Eonasdan/bootstrap-datetimepicker',
]
) . '</p>';
// Add a link to the Drupal.org project.
$output .= '<p>';
$output .= t('Visit the <a href=":project_link">Bootstrap Datetime Picker project page</a> on Drupal.org for more information.',
[
':project_link' => 'https://www.drupal.org/project/bootstrap_datetime_picker',
]
);
$output .= '</p>';
return $output;
}
}
/**
* Implements hook_theme().
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment