function FieldUiHooks::formFieldUiFieldStorageAddFormAlter
Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'.
File
-
core/
modules/ field_ui/ src/ Hook/ FieldUiHooks.php, line 234
Class
- FieldUiHooks
- Hook implementations for field_ui.
Namespace
Drupal\field_ui\HookCode
public function formFieldUiFieldStorageAddFormAlter(array &$form) : void {
$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.