Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -112,7 +112,7 @@ class HelpController extends ControllerBase {
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
public function helpPage($name) {
$build = array();
$build = [];
if ($this->moduleHandler()->implementsHook($name, 'help')) {
$module_name = $this->moduleHandler()->getName($name);
$build['#title'] = $module_name;
@ -122,9 +122,9 @@ class HelpController extends ControllerBase {
drupal_set_message($this->t('This module is experimental. <a href=":url">Experimental modules</a> are provided for testing purposes only. Use at your own risk.', [':url' => 'https://www.drupal.org/core/experimental']), 'warning');
}
$temp = $this->moduleHandler()->invoke($name, 'help', array("help.page.$name", $this->routeMatch));
$temp = $this->moduleHandler()->invoke($name, 'help', ["help.page.$name", $this->routeMatch]);
if (empty($temp)) {
$build['top'] = ['#markup' => $this->t('No help is available for module %module.', array('%module' => $module_name))];
$build['top'] = ['#markup' => $this->t('No help is available for module %module.', ['%module' => $module_name])];
}
else {
if (!is_array($temp)) {
@ -137,20 +137,20 @@ class HelpController extends ControllerBase {
// 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();
$links = [];
foreach ($admin_tasks as $task) {
$link['url'] = $task['url'];
$link['title'] = $task['title'];
$links[] = $link;
}
$build['links'] = array(
$build['links'] = [
'#theme' => 'links__help',
'#heading' => array(
'#heading' => [
'level' => 'h3',
'text' => $this->t('@module administration pages', array('@module' => $module_name)),
),
'text' => $this->t('@module administration pages', ['@module' => $module_name]),
],
'#links' => $links,
);
];
}
return $build;
}