Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/field/field.module @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
65 * Implements hook_help(). | 65 * Implements hook_help(). |
66 */ | 66 */ |
67 function field_help($route_name, RouteMatchInterface $route_match) { | 67 function field_help($route_name, RouteMatchInterface $route_match) { |
68 switch ($route_name) { | 68 switch ($route_name) { |
69 case 'help.page.field': | 69 case 'help.page.field': |
70 $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? \Drupal::url('help.page', ['name' => 'field_ui']) : '#'; | 70 $field_ui_url = \Drupal::moduleHandler()->moduleExists('field_ui') ? Url::fromRoute('help.page', ['name' => 'field_ui'])->toString() : '#'; |
71 $output = ''; | 71 $output = ''; |
72 $output .= '<h3>' . t('About') . '</h3>'; | 72 $output .= '<h3>' . t('About') . '</h3>'; |
73 $output .= '<p>' . t('The Field module allows custom data fields to be defined for <em>entity</em> types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the <a href=":field-ui-help">Field UI module</a> user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the <a href=":field">online documentation for the Field module</a>.', [':field-ui-help' => $field_ui_url, ':field' => 'https://www.drupal.org/documentation/modules/field']) . '</p>'; | 73 $output .= '<p>' . t('The Field module allows custom data fields to be defined for <em>entity</em> types (see below). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the <a href=":field-ui-help">Field UI module</a> user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the <a href=":field">online documentation for the Field module</a>.', [':field-ui-help' => $field_ui_url, ':field' => 'https://www.drupal.org/documentation/modules/field']) . '</p>'; |
74 $output .= '<h3>' . t('Terminology') . '</h3>'; | 74 $output .= '<h3>' . t('Terminology') . '</h3>'; |
75 $output .= '<dl>'; | 75 $output .= '<dl>'; |
85 $output .= '<dd>' . t('Content entity types and sub-types can have one or more <em>form modes</em>, used for editing. For instance, a content item could be edited in a compact format with only some fields editable, or a full format that allows all fields to be edited. In each form mode, each field can be hidden or displayed, and if it is displayed, you can choose and configure the <em>widget</em> that is used to edit the field. For instance, a taxonomy term reference field can be edited using a select list, radio buttons, or an autocomplete widget.') . '</dd>'; | 85 $output .= '<dd>' . t('Content entity types and sub-types can have one or more <em>form modes</em>, used for editing. For instance, a content item could be edited in a compact format with only some fields editable, or a full format that allows all fields to be edited. In each form mode, each field can be hidden or displayed, and if it is displayed, you can choose and configure the <em>widget</em> that is used to edit the field. For instance, a taxonomy term reference field can be edited using a select list, radio buttons, or an autocomplete widget.') . '</dd>'; |
86 $output .= '</dl>'; | 86 $output .= '</dl>'; |
87 $output .= '<h3>' . t('Uses') . '</h3>'; | 87 $output .= '<h3>' . t('Uses') . '</h3>'; |
88 $output .= '<dl>'; | 88 $output .= '<dl>'; |
89 $output .= '<dt>' . t('Enabling field types, widgets, and formatters') . '</dt>'; | 89 $output .= '<dt>' . t('Enabling field types, widgets, and formatters') . '</dt>'; |
90 $output .= '<dd>' . t('The Field module provides the infrastructure for fields; the field types, formatters, and widgets are provided by Drupal core or additional modules. Some of the modules are required; the optional modules can be enabled from the <a href=":modules">Extend administration page</a>. Additional fields, formatters, and widgets may be provided by contributed modules, which you can find in the <a href=":contrib">contributed module section of Drupal.org</a>.', [':modules' => \Drupal::url('system.modules_list'), ':contrib' => 'https://www.drupal.org/project/modules']) . '</dd>'; | 90 $output .= '<dd>' . t('The Field module provides the infrastructure for fields; the field types, formatters, and widgets are provided by Drupal core or additional modules. Some of the modules are required; the optional modules can be enabled from the <a href=":modules">Extend administration page</a>. Additional fields, formatters, and widgets may be provided by contributed modules, which you can find in the <a href=":contrib">contributed module section of Drupal.org</a>.', [':modules' => Url::fromRoute('system.modules_list')->toString(), ':contrib' => 'https://www.drupal.org/project/modules']) . '</dd>'; |
91 | 91 |
92 $output .= '<h3>' . t('Field, widget, and formatter information') . '</h3>'; | 92 $output .= '<h3>' . t('Field, widget, and formatter information') . '</h3>'; |
93 | 93 |
94 // Make a list of all widget, formatter, and field modules currently | 94 // Make a list of all widget, formatter, and field modules currently |
95 // enabled, ordered by displayed module name (module names are not | 95 // enabled, ordered by displayed module name (module names are not |