' . t('About') . ''; $output .= '

' . t('The Paragraphs Demo module provides several Paragraphs types for the Paragraphs module, but no separate user interface. For more information, see the online documentation for the Paragraphs module.', [':online' => 'https://www.drupal.org/node/2444881', ':paragraphs' => Url::fromRoute('help.page', ['name' => 'paragraphs'])->toString()]) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
' . t('Changing demo Paragraphs types') . '
'; $output .= '
' . t('Administrators can edit the provided Paragraphs types on the Paragraphs types page if the Field UI module is enabled. For more information on fields and entities, see the Field module help page.', [':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() : '#']) . '
'; $output .= '
' . t('Deleting demo Paragraphs types') . '
'; $output .= '
' . t('The provided demo Paragraph types stay available even when the Paragraphs Demo module is uninstalled. They can be deleted individually on the Paragraphs types page.', [':paragraphs' => Url::fromRoute('entity.paragraphs_type.collection')->toString()]) . '
'; return $output; break; } } /** * Implements hook_preprocess_node() for paragraph node templates. * * Attach css we need for paragraph demo content. */ function paragraphs_demo_preprocess_node(&$variables) { // If more general approach is needed then implement preprocessor for // paragraph.html.twig. if ($variables['node']->getType() === 'paragraphed_content_demo') { $variables['#attached']['library'][] = 'paragraphs_demo/drupal.paragraphs_demo'; } }