diff --git a/core/includes/common.inc b/core/includes/common.inc index fb25771..bb0183f 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -974,7 +974,7 @@ function l($text, $path, array $options = array()) { // Add a hreflang attribute if we know the language of this link's url and // hreflang has not already been set. if (!empty($variables['options']['language']) && !isset($variables['options']['attributes']['hreflang'])) { - $variables['options']['attributes']['hreflang'] = $variables['options']['language']->id; + $variables['options']['attributes']['hreflang'] = $variables['options']['language']->getId(); } // Set the "active" class if the 'set_active_class' option is not empty. diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php index 254260f..5f2989c 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php @@ -11,6 +11,7 @@ use Drupal\Component\Utility\Unicode; use Drupal\Core\Config\FileStorage; use Drupal\Core\Language\Language; +use Drupal\Core\Language\LanguageInterface; use Drupal\simpletest\WebTestBase; /** @@ -330,7 +331,7 @@ public function testContactConfigEntityTranslation() { // Test that delete links work and operations perform properly. foreach ($this->langcodes as $langcode) { - $replacements = array('%label' => t('!label !entity_type', array('!label' => $label, '!entity_type' => Unicode::strtolower(t('Contact category')))), '@language' => language_load($langcode)->name); + $replacements = array('%label' => t('!label !entity_type', array('!label' => $label, '!entity_type' => Unicode::strtolower(t('Contact category')))), '@language' => language_load($langcode)->getName()); $this->drupalGet("$translation_base_url/$langcode/delete"); $this->assertRaw(t('Are you sure you want to delete the @language translation of %label?', $replacements)); diff --git a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php index 2c2e5fd..778da76 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/ContentTranslationHandler.php @@ -73,7 +73,7 @@ public function getTranslationAccess(EntityInterface $entity, $op) { * {@inheritdoc} */ public function getSourceLangcode(array $form_state) { - return isset($form_state['content_translation']['source']) ? $form_state['content_translation']['source']->id : FALSE; + return isset($form_state['content_translation']['source']) ? $form_state['content_translation']['source']->getId() : FALSE; } /**