function LanguageHooks::fieldInfoAlter

Same name and namespace in other branches
  1. 11.x core/modules/language/src/Hook/LanguageHooks.php \Drupal\language\Hook\LanguageHooks::fieldInfoAlter()

Implements hook_field_info_alter().

Attributes

#[Hook('field_info_alter')]

File

core/modules/language/src/Hook/LanguageHooks.php, line 282

Class

LanguageHooks
Hook implementations for language.

Namespace

Drupal\language\Hook

Code

public function fieldInfoAlter(&$info) : void {
  // Change the default behavior of language field.
  $info['language']['class'] = '\\Drupal\\language\\DefaultLanguageItem';
}

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