You are here

function dynamic_entity_reference_form_field_ui_field_storage_add_form_alter in Dynamic Entity Reference 8.2

Same name and namespace in other branches
  1. 8 dynamic_entity_reference.module \dynamic_entity_reference_form_field_ui_field_storage_add_form_alter()

Implements hook_form_FORM_ID_alter() for 'field_ui_field_storage_add_form'.

File

./dynamic_entity_reference.module, line 112
Contains main module functionality.

Code

function dynamic_entity_reference_form_field_ui_field_storage_add_form_alter(array &$form) {
  $optgroup = (string) t('Dynamic Reference');

  // Move the "Dynamic entity reference" option to the end of the list and
  // rename it to "Other".
  unset($form['add']['new_storage_type']['#options'][$optgroup]['dynamic_entity_reference']);
  $form['add']['new_storage_type']['#options'][$optgroup]['dynamic_entity_reference'] = t('Other…');
}