Skip to content
Snippets Groups Projects

Issue #3296959: Drupal 10 compatibility

Closed Balint Pekker requested to merge issue/diff-3296959:3296959-automated-drupal-10 into 8.x-1.x
Files
3
@@ -31,11 +31,12 @@ class TextWithSummaryFieldBuilder extends FieldDiffBuilderBase {
@@ -31,11 +31,12 @@ class TextWithSummaryFieldBuilder extends FieldDiffBuilderBase {
if ($this->configuration['compare_format'] == 1) {
if ($this->configuration['compare_format'] == 1) {
if (isset($values['format'])) {
if (isset($values['format'])) {
$controller = $this->entityTypeManager->getStorage('filter_format');
$controller = $this->entityTypeManager->getStorage('filter_format');
 
/** @var \Drupal\filter\Entity\FilterFormat $format */
$format = $controller->load($values['format']);
$format = $controller->load($values['format']);
// The format loaded successfully.
// The format loaded successfully.
$label = $this->t('Format');
$label = $this->t('Format');
if ($format != NULL) {
if ($format != NULL) {
$result[$field_key][] = $label . ": " . $format->name;
$result[$field_key][] = $label . ": " . $format->get('name')->value;
}
}
else {
else {
$result[$field_key][] = $label . ": " . $this->t('Missing format @format', array('@format' => $values[$field_key]));
$result[$field_key][] = $label . ": " . $this->t('Missing format @format', array('@format' => $values[$field_key]));
Loading