function paragraphs_form_field_storage_config_edit_form_alter

Implements hook_form_FORM_ID_alter().

File

paragraphs/paragraphs.module, line 120
Contains paragraphs.module

Code

function paragraphs_form_field_storage_config_edit_form_alter(&$form, FormStateInterface $form_state, $form_id) {
  if ($form_state
    ->getFormObject()
    ->getEntity()
    ->getType() == 'entity_reference') {

    // Entity Reference fields are no longer supported to reference Paragraphs.
    unset($form['settings']['target_type']['#options'][(string) t('Content')]['paragraph']);
  }
}