function paragraphs_help in Paragraphs 8
Implements hook_help().
File
- ./
paragraphs.module, line 20 - Contains paragraphs.module
Code
function paragraphs_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the paragraphs module.
case 'help.page.paragraphs':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Paragraphs module provides a field type that can contain several other fields and thereby allows users to break content up on a page. Administrators can predefine <em>Paragraphs types</em> (for example a simple text block, a video, or a complex and configurable slideshow). Users can then place them on a page in any order instead of using a text editor to add and configure such elements. For more information, see the <a href=":online">online documentation for the Paragraphs module</a>.', [
':online' => 'https://www.drupal.org/node/2444881',
]) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dt>' . t('Creating Paragraphs types') . '</dt>';
$output .= '<dd>' . t('<em>Paragraphs types</em> can be created by clicking <em>Add Paragraphs type</em> on the <a href=":paragraphs">Paragraphs types page</a>. By default a new Paragraphs type does not contain any fields.', [
':paragraphs' => Url::fromRoute('entity.paragraphs_type.collection')
->toString(),
]) . '</dd>';
$output .= '<dt>' . t('Configuring Paragraphs types') . '</dt>';
$output .= '<dd>' . t('Administrators can add fields to a <em>Paragraphs type</em> on the <a href=":paragraphs">Paragraphs types page</a> if the <a href=":field_ui">Field UI</a> module is enabled. The form display and the display of the Paragraphs type can also be managed on this page. 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('Creating content with Paragraphs') . '</dt>';
$output .= '<dd>' . t('Administrators can add a <em>Paragraph</em> field to content types or other entities, and configure which <em>Paragraphs types</em> to include. When users create content, they can then add one or more paragraphs by choosing the appropriate type from the dropdown list. Users can also dragdrop these paragraphs. This allows users to add structure to a page or other content (for example by adding an image, a user reference, or a differently formatted block of text) more easily then including it all in one text field or by using fields in a pre-defined order.') . '</dd>';
return $output;
break;
}
}