Chris@0: ' . t('About') . ''; Chris@0: $output .= '
' . t('The Place Blocks module allows you to place blocks from every page. For more information, see the online documentation for the Place Blocks module.', [':blocks-documentation' => 'https://www.drupal.org/documentation/modules/block_place/']) . '
'; Chris@0: $output .= '' . t('Block placement is specific to each theme on your site. This module allows you to place blocks in the context of your content pages.') . '
'; Chris@0: return $output; Chris@0: } Chris@0: } Chris@0: Chris@0: /** Chris@0: * Implements hook_toolbar(). Chris@0: */ Chris@0: function block_place_toolbar() { Chris@0: // Link to the current page with a query parameter. Chris@0: $query = \Drupal::request()->query->all(); Chris@0: $wrapper_class = ''; Chris@0: $status_class = ''; Chris@0: $description = ''; Chris@0: if (isset($query['block-place'])) { Chris@0: $status_class = 'active'; Chris@0: $wrapper_class = 'is-active'; Chris@0: $description = t('Exit Place block mode.'); Chris@0: unset($query['block-place']); Chris@0: unset($query['destination']); Chris@0: } Chris@0: else { Chris@0: $status_class = 'inactive'; Chris@0: $description = t('Show regions to Place blocks.'); Chris@0: $query['block-place'] = '1'; Chris@0: // Setting destination is both a work-around for the toolbar "Back to site" Chris@0: // link in escapeAdmin.js and used for the destination after picking a Chris@0: // block. Chris@0: $query['destination'] = Url::fromRoute('