diff -u b/src/Plugin/Block/MenuBlock.php b/src/Plugin/Block/MenuBlock.php --- b/src/Plugin/Block/MenuBlock.php +++ b/src/Plugin/Block/MenuBlock.php @@ -56,21 +56,21 @@ $form['advanced']['label_type'] = [ '#type' => 'select', - '#title' => 'Use the following as title', + '#title' => $this->t("Use the following as title"), '#options' => [ - 'block' => $this->t('Block title'), - 'menu' => $this->t('Menu title'), - 'active_item' => $this->t('Active item\'s title'), - 'parent' => $this->t('Active trail\'s parent title'), - 'root' => $this->t('Active trail\'s root title'), - 'initial_menu_item' => $this->t('Initial menu item\'s title') + 'block' => $this->t("Block title"), + 'menu' => $this->t("Menu title"), + 'active_item' => $this->t("Active item's title"), + 'parent' => $this->t("Active trail's parent title"), + 'root' => $this->t("Active trail's root title"), + 'initial_menu_item' => $this->t("Initial menu item's title"), ], '#default_value' => $config['label_type'], '#states' => [ 'visible' => [ - ':input[name="settings[label_display]"]' => ['checked' => TRUE] - ] - ] + ':input[name="settings[label_display]"]' => ['checked' => TRUE], + ], + ], ]; $form['style'] = [ @@ -92,7 +92,7 @@ ]; // Open the details field sets if their config is not set to defaults. - foreach(['menu_levels', 'advanced', 'style'] as $fieldSet) { + foreach (['menu_levels', 'advanced', 'style'] as $fieldSet) { foreach (array_keys($form[$fieldSet]) as $field) { if (isset($defaults[$field]) && $defaults[$field] !== $config[$field]) { $form[$fieldSet]['#open'] = TRUE;