function ContentTranslationHooks::languageTypesInfoAlter

Same name and namespace in other branches
  1. 11.x core/modules/content_translation/src/Hook/ContentTranslationHooks.php \Drupal\content_translation\Hook\ContentTranslationHooks::languageTypesInfoAlter()

Implements hook_language_types_info_alter().

Attributes

#[Hook('language_types_info_alter')]

File

core/modules/content_translation/src/Hook/ContentTranslationHooks.php, line 91

Class

ContentTranslationHooks
Hook implementations for content_translation.

Namespace

Drupal\content_translation\Hook

Code

public function languageTypesInfoAlter(array &$language_types) : void {
  // Make content language negotiation configurable by removing the 'locked'
  // flag.
  $language_types[LanguageInterface::TYPE_CONTENT]['locked'] = FALSE;
  unset($language_types[LanguageInterface::TYPE_CONTENT]['fixed']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.