Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023

This commit is contained in:
Pantheon Automation 2015-09-04 13:20:09 -07:00 committed by Greg Anderson
parent 2720a9ec4b
commit f3791f1da3
1898 changed files with 54300 additions and 11481 deletions

View file

@ -12,7 +12,6 @@ use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Drupal\Component\Utility\SafeMarkup;
/**
* Controller routines for help routes.
@ -115,7 +114,7 @@ class HelpController extends ControllerBase {
$build = array();
if ($this->moduleHandler()->implementsHook($name, 'help')) {
$module_name = $this->moduleHandler()->getName($name);
$build['#title'] = SafeMarkup::checkPlain($module_name);
$build['#title'] = $module_name;
$temp = $this->moduleHandler()->invoke($name, 'help', array("help.page.$name", $this->routeMatch));
if (empty($temp)) {
@ -126,7 +125,7 @@ class HelpController extends ControllerBase {
}
// Only print list of administration pages if the module in question has
// any such pages associated to it.
// any such pages associated with it.
$admin_tasks = system_get_module_admin_tasks($name, system_get_info('module', $name));
if (!empty($admin_tasks)) {
$links = array();

View file

@ -26,13 +26,6 @@ use Symfony\Component\HttpFoundation\Request;
*/
class HelpBlock extends BlockBase implements ContainerFactoryPluginInterface {
/**
* Stores the help text associated with the active menu item.
*
* @var string
*/
protected $help;
/**
* The module handler.
*
@ -92,19 +85,6 @@ class HelpBlock extends BlockBase implements ContainerFactoryPluginInterface {
);
}
/**
* {@inheritdoc}
*/
protected function blockAccess(AccountInterface $account) {
$this->help = $this->getActiveHelp($this->request);
if ($this->help) {
return AccessResult::allowed();
}
else {
return AccessResult::forbidden();
}
}
/**
* Returns the help associated with the active menu item.
*
@ -125,9 +105,15 @@ class HelpBlock extends BlockBase implements ContainerFactoryPluginInterface {
* {@inheritdoc}
*/
public function build() {
return array(
'#children' => $this->help,
);
$help = $this->getActiveHelp($this->request);
if (!$help) {
return [];
}
else {
return [
'#children' => $help,
];
}
}
/**