diff --git a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php index 781d257..15cc5d0 100644 --- a/core/modules/system/src/Plugin/Block/SystemMenuBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemMenuBlock.php @@ -95,10 +95,10 @@ public function blockForm($form, FormStateInterface $form_state) { $form['menu_levels']['level'] = array( '#type' => 'select', - '#title' => $this->t('Start at menu level'), + '#title' => $this->t('Initial menu level'), '#default_value' => $config['level'], '#options' => $options, - '#description' => $this->t('By selecting menu level 1, this menu will always be visible. By selecting menu level 2 or lower, this menu will only be visible if the menu item for the current page is at the selected starting level or is nested below a menu item at that starting level.'), + '#description' => $this->t('The menu will only be visible if the menu item for the current page is at or below the selected starting level. Select level 1 to always keep this menu visible.'), '#required' => TRUE, ); @@ -109,7 +109,7 @@ public function blockForm($form, FormStateInterface $form_state) { '#title' => $this->t('Maximum number of menu levels to display'), '#default_value' => $config['depth'], '#options' => $options, - '#description' => $this->t('If the starting menu level is 1, and the maximum number of menu levels displayed is 1, then only level 1 will be displayed. With starting level 2 and maximum levels of 2, then menu levels 2 and 3 can be displayed. The default setting of Unlimited places no limits on the number of menu levels that can be displayed.'), + '#description' => $this->t('The maximum number of menu levels to show, starting from the initial menu level. For example: with an initial level 2 and a maximum number of 3, menu levels 2, 3 and 4 can be displayed.'), '#required' => TRUE, ); @@ -117,7 +117,7 @@ public function blockForm($form, FormStateInterface $form_state) { } /** - * Adjusts the #parents of menu_levels to save its children at the top level + * Adjusts the #parents of menu_levels to save its children at the top level. */ public static function processMenuLevelParents(&$element, FormStateInterface $form_state, &$complete_form) { array_pop($element['#parents']); @@ -164,11 +164,11 @@ public function defaultConfiguration() { // 1) it is possible to set a different max age for individual blocks, since // this is just the default value. // 2) modules can modify caching by implementing hook_block_view_alter() - return array( + return [ 'cache' => array('max_age' => Cache::PERMANENT), 'level' => 1, 'depth' => 0, - ); + ]; } /**