}/**
* Add the oEmbed loading attribute setting to field formatter instances.
*/
function media_post_update_oembed_loading_attribute(array &
$sandbox = NULL
): void
{ $media_config_updater = \Drupal::
classResolver(MediaConfigUpdater::
class);
assert($media_config_updater instanceof MediaConfigUpdater
);
$media_config_updater->
setDeprecationsEnabled(TRUE
);
\Drupal::
classResolver(ConfigEntityUpdater::
class)->
update($sandbox, 'entity_view_display',
function DEntityViewDisplayInterface
$view_display) use ($media_config_updater): bool
{ return $media_config_updater->
processOembedEagerLoadField($view_display);
});
}