* Allows configuring blocks and other configuration from the site front-end.
*/
use Drupal\Core\Asset\AttachedAssetsInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\outside_in\Block\BlockEntityOffCanvasForm;
use Drupal\outside_in\Form\SystemBrandingOffCanvasForm;
use Drupal\outside_in\Form\SystemMenuOffCanvasForm;
/**
* Implements hook_help().
*/
function outside_in_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.outside_in':
$output = '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Settings Tray module provides an \'edit mode\' in which clicking on a block opens a slide-out tray which allows configuration to be altered without leaving the page.For more information, see the <a href=":outside-in-documentation">online documentation for the Settings Tray module</a>.', [':outside-in-documentation' => 'https://www.drupal.org/documentation/modules/outside_in']) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Editing blocks on the same page in the slide-out tray') . '</dt>';
$output .= '</dl>';
return ['#markup' => $output];
}
}
/**
* Implements hook_contextual_links_view_alter().
*
* Change Configure Blocks into offcanvas links.
*/
function outside_in_contextual_links_view_alter(&$element, $items) {
if (isset($element['#links']['outside-inblock-configure'])) {