function field_ui_form_field_ui_field_storage_add_form_alter
Same name in other branches
- 8.9.x core/modules/field_ui/field_ui.module \field_ui_form_field_ui_field_storage_add_form_alter()
- 10 core/modules/field_ui/field_ui.module \field_ui_form_field_ui_field_storage_add_form_alter()
- 11.x core/modules/field_ui/field_ui.module \field_ui_form_field_ui_field_storage_add_form_alter()
Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'.
File
-
core/
modules/ field_ui/ field_ui.module, line 244
Code
function field_ui_form_field_ui_field_storage_add_form_alter(array &$form) {
$optgroup = (string) t('Reference');
// Move the "Entity reference" option to the end of the list and rename it to
// "Other".
unset($form['add']['new_storage_type']['#options'][$optgroup]['entity_reference']);
$form['add']['new_storage_type']['#options'][$optgroup]['entity_reference'] = t('Other…');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.