language_entity_base_field_info_alter

language_entity_base_field_info_alter(&$fields)

Implements hook_entity_base_field_info_alter().

File

core/modules/language/language.module, line 167
Add language handling functionality to Drupal.

Code

function language_entity_base_field_info_alter(&$fields) {
  foreach ($fields as $definition) {
    // Set configurable form display for language fields with display options.
    if ($definition->getType() == 'language') {
      foreach (array('form', 'view') as $type) {
        if ($definition->getDisplayOptions($type)) {
          // The related configurations will be purged manually on Language
          // module uninstallation. @see language_modules_uninstalled().
          $definition->setDisplayConfigurable($type, TRUE);
        }
      }
    }
  }
}
doc_Drupal
2016-10-29 09:23:01
Comments
Leave a Comment

Please login to continue.