foreach ($field_storages as $field) {
$field_labels[] = $field->label();
}
- drupal_set_message(\Drupal::translation()->formatPlural(
+ \Drupal::messenger()->addWarning(\Drupal::translation()->formatPlural(
count($field_storages),
'This synchronization will delete data from the field %fields.',
'This synchronization will delete data from the fields: %fields.',
['%fields' => implode(', ', $field_labels)]
- ), 'warning');
+ ));
}
}
}