You are here

function webform_webform_options_languages_alter in Webform 6.x

Same name and namespace in other branches
  1. 8.5 includes/webform.options.inc \webform_webform_options_languages_alter()

Implements hook_webform_options_WEBFORM_OPTIONS_ID_alter() for languages options.

File

includes/webform.options.inc, line 66
Options alter hooks.

Code

function webform_webform_options_languages_alter(array &$options, array $element = []) {
  if (empty($options)) {
    $languages = LanguageManager::getStandardLanguageList();
    unset($languages['en-x-simple']);
    $options = [];
    foreach ($languages as $language) {
      $options[$language[0]] = $language[0];
    }
  }
}