diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldHelpTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldHelpTest.php index ea172eb..4ea5979 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FieldHelpTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FieldHelpTest.php @@ -54,16 +54,16 @@ public function testFieldHelp() { // Visit the Help page and make sure no warnings or notices are thrown. $this->drupalGet('admin/help/field'); - // Enable the Options, Telephone and E-mail modules. - \Drupal::moduleHandler()->install(array('options', 'telephone', 'email')); + // Enable the Options, E-mail and Field API Test modules. + \Drupal::moduleHandler()->install(array('options', 'email', 'field_test')); \Drupal::service('plugin.manager.field.widget')->clearCachedDefinitions(); \Drupal::service('plugin.manager.entity.field.field_type')->clearCachedDefinitions(); $this->drupalGet('admin/help/field'); $this->assertLink('Options', 0, 'Options module is listed on the Field help page.'); $this->assertLink('E-mail', 0, 'E-mail module is listed on the Field help page.'); - $this->assertText('Telephone', 'Modules with field types that do not implement hook_help are listed.'); - $this->assertNoLink('Telephone', 'Modules with field types that do not implement hook_help are not linked.'); + $this->assertText('Field API Test', 'Modules with field types that do not implement hook_help are listed.'); + $this->assertNoLink('Field API Test', 'Modules with field types that do not implement hook_help are not linked.'); $this->assertNoLink('Link', 'Modules that have not been installed, are not listed.'); } } diff --git a/core/modules/telephone/telephone.module b/core/modules/telephone/telephone.module index 2d2bd35..23099a9 100644 --- a/core/modules/telephone/telephone.module +++ b/core/modules/telephone/telephone.module @@ -6,6 +6,26 @@ */ /** + * Implements hook_help(). + */ +function telephone_help($path, $arg) { + switch ($path) { + case 'admin/help#telephone': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Telephone module allows you to create fields that contain telephone numbers. See the Field module help and the Field UI help pages for general information on fields and how to create and manage them. For more information, see the online documentation for the Telephone module.', array('!field' => \Drupal::url('help.page', array('name' => 'field')), '!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')), '!telephone_documentation' => 'https://drupal.org/documentation/modules/telephone')) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Managing and displaying telephone fields') . '
'; + $output .= '
' . t('The settings and the display of the telephone field can be configured separately. See the Field UI help for more information on how to manage fields and their display.', array('!field_ui' => \Drupal::url('help.page', array('name' => 'field_ui')))) . '
'; + $output .= '
' . t('Displaying telephone numbers as links') . '
'; + $output .= '
' . t('Telephone numbers can be displayed as links with the scheme name tel: by choosing the Telephone display format on the Manage display page. Any spaces will be stripped out of the link text.') . '
'; + $output .= '
'; + return $output; + } +} + +/** * Implements hook_field_info_alter(). */ function telephone_field_info_alter(&$info) {