X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcontent_translation%2Fsrc%2FContentTranslationHandler.php;fp=web%2Fcore%2Fmodules%2Fcontent_translation%2Fsrc%2FContentTranslationHandler.php;h=0fef1bed47faabed957c4da3a6a409cbe902266b;hp=bcf66bd53b0fbebe421b481c25a7a72a6b22fade;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/content_translation/src/ContentTranslationHandler.php b/web/core/modules/content_translation/src/ContentTranslationHandler.php index bcf66bd53..0fef1bed4 100644 --- a/web/core/modules/content_translation/src/ContentTranslationHandler.php +++ b/web/core/modules/content_translation/src/ContentTranslationHandler.php @@ -512,10 +512,6 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface, E '#default_value' => $new_translation || !$date ? '' : format_date($date, 'custom', 'Y-m-d H:i:s O'), ]; - if (isset($language_widget)) { - $language_widget['#multilingual'] = TRUE; - } - $form['#process'][] = [$this, 'entityFormSharedElements']; } @@ -734,7 +730,7 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface, E 'target' => $form_object->getFormLangcode($form_state), ]); $languages = $this->languageManager->getLanguages(); - drupal_set_message(t('Source language set to: %language', ['%language' => $languages[$source]->getName()])); + $this->messenger->addStatus(t('Source language set to: %language', ['%language' => $languages[$source]->getName()])); } /** @@ -743,10 +739,10 @@ class ContentTranslationHandler implements ContentTranslationHandlerInterface, E * Takes care of entity deletion. */ public function entityFormDelete($form, FormStateInterface $form_state) { - $form_object = $form_state->getFormObject()->getEntity(); + $form_object = $form_state->getFormObject(); $entity = $form_object->getEntity(); if (count($entity->getTranslationLanguages()) > 1) { - drupal_set_message(t('This will delete all the translations of %label.', ['%label' => $entity->label()]), 'warning'); + $this->messenger->addWarning(t('This will delete all the translations of %label.', ['%label' => $entity->label()])); } }