diff --git a/entity_reference_display.module b/entity_reference_display.module index ea1b94354514a780e2939c78ed90c77d3003d7ff..8d4e407506ab34db5d14528f7f8cbd3a5477a793 100644 --- a/entity_reference_display.module +++ b/entity_reference_display.module @@ -8,6 +8,32 @@ use Drupal\Component\Utility\Html; use Drupal\Core\Form\FormStateInterface; use Drupal\entity_reference_display\Plugin\Field\FieldFormatter\EntityReferenceRevisionsDisplayFormatter; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function entity_reference_display_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + // Main module help for the entity_reference_display module. + case 'help.page.entity_reference_display': + $output = ''; + $output .= '<h3>' . t('About') . '</h3>'; + $output .= '<p>' . t('This module defines a simple field type for display mode selection for entity + reference fields. This allows an editor to select how they would like the + references displayed. </p> <p> <strong> + "Display mode" field type: </strong> This field allows you to specify a display mode + for the rendering of entity reference fields. You can configure available + options to show only certain display modes. The user then selects one from these + and affects the way your entity reference field renders items.</p> <p> + <strong>"Selected display mode" field formatter:</strong> This formatter allows you to render + referenced entities with a selected display mode. The formatter is available + only for entity reference fields where the base entity contains at least one + display mode field. When there are more display fields available, you can choose + one.') . '</p>'; + return $output; + } +} /** * Implements hook_form_alter().