function media_post_update_oembed_loading_attribute

Add the oEmbed loading attribute setting to field formatter instances.

File

core/modules/media/media.post_update.php, line 29

Code

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 (EntityViewDisplayInterface $view_display) use ($media_config_updater) : bool {
    return $media_config_updater->processOembedEagerLoadField($view_display);
  });
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.