You are here

flags_languagefield.module in Flags 8

File

flags_languagefield/flags_languagefield.module
View source
<?php

function flags_languagefield_field_widget_info_alter(array &$info) {

  // Allow to use widget language_select_menu only when select_icons enabled.
  if (\Drupal::moduleHandler()
    ->moduleExists('select_icons')) {
    $info['languagefield_select_menu']['field_types'][] = 'language_field';
  }
}