You are here

protected function HelpBlock::getActiveHelp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/help/src/Plugin/Block/HelpBlock.php \Drupal\help\Plugin\Block\HelpBlock::getActiveHelp()

Returns the help associated with the active menu item.

Parameters

\Symfony\Component\HttpFoundation\Request $request: The current request.

1 call to HelpBlock::getActiveHelp()
HelpBlock::build in core/modules/help/src/Plugin/Block/HelpBlock.php
Builds and returns the renderable array for this block plugin.

File

core/modules/help/src/Plugin/Block/HelpBlock.php, line 93
Contains \Drupal\help\Plugin\Block\HelpBlock.

Class

HelpBlock
Provides a 'Help' block.

Namespace

Drupal\help\Plugin\Block

Code

protected function getActiveHelp(Request $request) {

  // Do not show on a 403 or 404 page.
  if ($request->attributes
    ->has('exception')) {
    return '';
  }
  $help = $this->moduleHandler
    ->invokeAll('help', array(
    $this->routeMatch
      ->getRouteName(),
    $this->routeMatch,
  ));
  return $help ? implode("\n", $help) : '';
}