Skip to content
Snippets Groups Projects
Commit fcfac856 authored by Eleo Basili's avatar Eleo Basili
Browse files

Issue #3419382 by ankitdebnath, Mingsong, Anybody, eleonel: Drupal 10.2.x compatibility

parent e4c90fe7
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,13 @@ use Drupal\entity_reference_display\Plugin\Field\FieldFormatter\EntityReferenceR
* Implements hook_form_alter().
*/
function entity_reference_display_form_alter(&$form, FormStateInterface $form_state, $form_id) {
/** @var \Drupal\field\Entity\FieldConfig $field_config */
$field_config = $form_state->getStorage()['field_config'];
if ($field_config->getType() !== 'entity_reference_display') {
// Exit early if not the correct field type.
return;
}
switch ($form_id) {
case 'field_storage_config_edit_form':
// Disable editing and remove states for the cardinality settings.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment