Skip to content
Snippets Groups Projects
Commit e3d1d01d authored by Sonal Gyanani's avatar Sonal Gyanani Committed by Sonal Gyanani
Browse files

Issue #3335796: Add hook help

parent 2206d90c
Branches
Tags 10.0.0-beta5
1 merge request!5Issue #3335796: Add hook help
......@@ -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().
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment