function field_ui_form_field_ui_field_storage_add_form_alter

field_ui_form_field_ui_field_storage_add_form_alter(array &$form)

Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'.

File

core/modules/field_ui/field_ui.module, line 244
Allows administrators to attach custom fields to fieldable types.

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…');
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!field_ui!field_ui.module/function/field_ui_form_field_ui_field_storage_add_form_alter/8.1.x