diff --git a/core/modules/image/src/Entity/ImageStyle.php b/core/modules/image/src/Entity/ImageStyle.php index 7314435..041c6a4 100644 --- a/core/modules/image/src/Entity/ImageStyle.php +++ b/core/modules/image/src/Entity/ImageStyle.php @@ -137,7 +137,7 @@ protected static function replaceImageStyle(ImageStyleInterface $style) { if ($style->id() != $style->getOriginalId()) { // Loop through all entity displays looking for formatters / widgets using // the image style. - foreach (entity_load_multiple('entity_view_display') as $display) { + foreach (EntityViewDisplay::loadMultiple() as $display) { foreach ($display->getComponents() as $name => $options) { if (isset($options['type']) && $options['type'] == 'image' && $options['settings']['image_style'] == $style->getOriginalId()) { $options['settings']['image_style'] = $style->id(); @@ -146,7 +146,7 @@ protected static function replaceImageStyle(ImageStyleInterface $style) { } } } - foreach (entity_load_multiple('entity_form_display') as $display) { + foreach (EntityViewDisplay::loadMultiple() as $display) { foreach ($display->getComponents() as $name => $options) { if (isset($options['type']) && $options['type'] == 'image_image' && $options['settings']['preview_image_style'] == $style->getOriginalId()) { $options['settings']['preview_image_style'] = $style->id();