diff --git a/core/modules/config_translation/src/FormElement/DateFormat.php b/core/modules/config_translation/src/FormElement/DateFormat.php index 25858cf15cfe2118f660d18c3364b68e175aac19..2e089cb1bdaab926b42f7903dfcc5ffd271e1990 100644 --- a/core/modules/config_translation/src/FormElement/DateFormat.php +++ b/core/modules/config_translation/src/FormElement/DateFormat.php @@ -28,7 +28,7 @@ public function getFormElement(DataDefinitionInterface $definition, LanguageInte $format = $this->t('Displayed as %date_format', array('%date_format' => \Drupal::service('date')->format(REQUEST_TIME, 'custom', $value))); return array( '#type' => 'textfield', - '#title' => $this->t($definition['label']) . '<span class="visually-hidden"> (' . $language->name . ')</span>', + '#title' => $this->t($definition->getLabel()) . '<span class="visually-hidden"> (' . $language->name . ')</span>', '#description' => $description, '#default_value' => $value, '#attributes' => array('lang' => $language->id), diff --git a/core/modules/config_translation/src/FormElement/Textarea.php b/core/modules/config_translation/src/FormElement/Textarea.php index 8092e4b7bce5d1b25b2bfff05e6d6e2bc527c9e6..e4692ec2902cce9f49023c637bf64927bde29518 100644 --- a/core/modules/config_translation/src/FormElement/Textarea.php +++ b/core/modules/config_translation/src/FormElement/Textarea.php @@ -29,7 +29,7 @@ public function getFormElement(DataDefinitionInterface $definition, LanguageInte return array( '#type' => 'textarea', '#default_value' => $value, - '#title' => $this->t($definition['label']) . '<span class="visually-hidden"> (' . $language->name . ')</span>', + '#title' => $this->t($definition->getLabel()) . '<span class="visually-hidden"> (' . $language->name . ')</span>', '#rows' => $rows, '#attributes' => array('lang' => $language->id), ); diff --git a/core/modules/config_translation/src/FormElement/Textfield.php b/core/modules/config_translation/src/FormElement/Textfield.php index a4a820f1e0602b010490e6df7348a76ada17b675..34759dc93d7c50a46e44348091d1dd582f5a8571 100644 --- a/core/modules/config_translation/src/FormElement/Textfield.php +++ b/core/modules/config_translation/src/FormElement/Textfield.php @@ -24,7 +24,7 @@ public function getFormElement(DataDefinitionInterface $definition, LanguageInte return array( '#type' => 'textfield', '#default_value' => $value, - '#title' => $this->t($definition['label']) . '<span class="visually-hidden"> (' . $language->name . ')</span>', + '#title' => $this->t($definition->getLabel()) . '<span class="visually-hidden"> (' . $language->name . ')</span>', '#attributes' => array('lang' => $language->id), ); }