diff --git a/xnumber.module b/xnumber.module index 7f290d6..6ca419c 100644 --- a/xnumber.module +++ b/xnumber.module @@ -5,6 +5,27 @@ * Contains xnumber.module. */ +use Drupal\Core\Routing\RouteMatchInterface; + + +/** + * Implements hook_help(). + */ +function xnumber_help($route_name, RouteMatchInterface $route_match): ?string { + switch ($route_name) { + // Main module help for the xnumber module. + case 'help.page.xnumber': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('Adds extended xinteger, xdecimal, xfloat field types and xnumber form display widget.') . '

'; + $output .= '

' . t('Additionally, each type is provided with the unsigned storage setting, allowing to restrict input on a field only to positive values.') . '

'; + $output .= '

' . t('One more useful feature of the module is working Default value property, which has no any effect on the current core set up, despite being exposed as one of the field settings.') . '

'; + return $output; + + default: + return ''; + } +} /** * Implements hook_field_formatter_info_alter(). */