function paragraphs_demo_help in Paragraphs 8
Implements hook_help().
File
- modules/
paragraphs_demo/ paragraphs_demo.module, line 14 - Contains paragraphs_demo.module
Code
function paragraphs_demo_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Help for the paragraphs demo module.
case 'help.page.paragraphs_demo':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Paragraphs Demo module provides several <em>Paragraphs types</em> for the <a href=":paragraphs">Paragraphs module</a>, but no separate user interface. For more information, see the <a href=":online">online documentation for the Paragraphs module</a>.', [
':online' => 'https://www.drupal.org/node/2444881',
':paragraphs' => Url::fromRoute('help.page', [
'name' => 'paragraphs',
])
->toString(),
]) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dt>' . t('Changing demo Paragraphs types') . '</dt>';
$output .= '<dd>' . t('Administrators can edit the provided <em>Paragraphs types</em> on the <a href=":paragraphs">Paragraphs types page</a> if the <a href=":field_ui">Field UI</a> module is enabled. For more information on fields and entities, see the <a href=":field">Field module help page</a>.', [
':paragraphs' => Url::fromRoute('entity.paragraphs_type.collection')
->toString(),
':field' => Url::fromRoute('help.page', [
'name' => 'field',
])
->toString(),
':field_ui' => \Drupal::moduleHandler()
->moduleExists('field_ui') ? Url::fromRoute('help.page', [
'name' => 'field_ui',
])
->toString() : '#',
]) . '</dd>';
$output .= '<dt>' . t('Deleting demo Paragraphs types') . '</dt>';
$output .= '<dd>' . t('The provided <em>demo Paragraph types</em> stay available even when the Paragraphs Demo module is uninstalled. They can be deleted individually on the <a href=":paragraphs">Paragraphs types page</a>.', [
':paragraphs' => Url::fromRoute('entity.paragraphs_type.collection')
->toString(),
]) . '</dd>';
return $output;
break;
}
}