diff -u b/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php --- b/core/modules/system/src/Form/ModulesListForm.php +++ b/core/modules/system/src/Form/ModulesListForm.php @@ -210,7 +210,7 @@ '#open' => TRUE, // Ensure that the "Core" package comes first. '#weight' => $package == 'Core' ? -10 : NULL, - '#attributes' => array('class' => array('package-listing')), + '#attributes' => ['class' => ['package-listing']], 'table' => $table, ); } @@ -263,7 +263,7 @@ '#options' => array( 'attributes' => array( 'id' => 'edit-modules-core-' . $module->getName() . '-links-help', - 'class' => array('module-link', 'module-link-help'), + 'class' => ['module-link', 'module-link-help'], 'title' => $this->t('Help'), ), ), @@ -322,7 +322,7 @@ // Present a checkbox for installing and indicating the status of a module. $row['enable'] = array( '#type' => 'checkbox', - '#wrapper_attributes' => array('class' => array('checkbox')), + '#wrapper_attributes' => ['class' => ['checkbox']], '#default_value' => (bool) $module->status, '#disabled' => (bool) $module->status, ); @@ -421,7 +421,7 @@ $row['enable'] += array( '#id' => $id, - '#parents' => array('modules', $module->info['package'], $module->getName(), 'enable'), + '#parents' => ['modules', $module->info['package'], $module->getName(), 'enable'], ); // Add the module label and expand/collapse functionality. @@ -433,15 +433,14 @@ 'label_id' => $id, 'module_name' => $module->info['name'], ), - '#wrapper_attributes' => array( - 'class' => array('module'), - ), + '#wrapper_attributes' => ['class' => ['module']], ); // Add the description, along with any modules it requires. $description = ''; + $description .= '
'; + $description .= '
' . $this->t('Machine name: !key', array('!key' => $module->getName())) . '
'; if ($module->info['version'] || $row['#requires'] || $row['#required_by']) { - $description .= '
'; if ($module->info['version']) { $description .= '
' . $this->t('Version: !module-version', array('!module-version' => $module->info['version'])) . '
'; } @@ -451,11 +450,11 @@ if ($row['#required_by']) { $description .= '
' . $this->t('Required by: !module-list', array('!module-list' => implode(', ', $row['#required_by']))) . '
'; } - $description .= '
'; } + $description .= '
'; $links = ''; - foreach (array('help', 'permissions', 'configure') as $key) { + foreach (['help', 'permissions', 'configure'] as $key) { $links .= (isset($row_links[$key]) ? drupal_render($row_links[$key]) : ''); } @@ -469,11 +468,9 @@ '#type' => 'details', '#title' => $this->t(' ' . $module->info['description'] . ''), '#attributes' => array('id' => $id . '-description'), - '#description' => t($description), + '#description' => $description, '#collapsed' => TRUE, - '#wrapper_attributes' => array( - 'class' => array('description', 'expand'), - ), + '#wrapper_attributes' => ['class' => ['description', 'expand']] ); return $row;