diff --git a/core/modules/layout_builder/layout_builder.module b/core/modules/layout_builder/layout_builder.module index 1ab27fab41417500d93e937e7397e715787cb2f9..895145d984e896c1db0b16b2fe06b1f0a71801e7 100644 --- a/core/modules/layout_builder/layout_builder.module +++ b/core/modules/layout_builder/layout_builder.module @@ -11,14 +11,28 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Plugin\Context\Context; use Drupal\Core\Plugin\Context\ContextDefinition; +use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; +use Drupal\Core\Url; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; /** * Implements hook_help(). */ -function layout_builder_help($route_name) { +function layout_builder_help($route_name, RouteMatchInterface $route_match) { + // Add help text to the Layout Builder UI. + if ($route_match->getRouteObject()->getOption('_layout_builder')) { + $output = '<p>' . t('This layout builder tool allows you to configure the layout of the main content area.') . '</p>'; + if (\Drupal::currentUser()->hasPermission('administer blocks')) { + $output .= '<p>' . t('To manage other areas of the page, use the <a href="@block-ui">block administration page</a>.', ['@block-ui' => Url::fromRoute('block.admin_display')->toString()]) . '</p>'; + } + else { + $output .= '<p>' . t('To manage other areas of the page, use the block administration page.') . '</p>'; + } + return $output; + } + switch ($route_name) { case 'help.page.layout_builder': $output = '<h3>' . t('About') . '</h3>';