function block_content_post_update_remove_block_content_listing_empty
Remove block_content_listing_empty from views.
File
-
core/
modules/ block_content/ block_content.post_update.php, line 44
Code
function block_content_post_update_remove_block_content_listing_empty(?array &$sandbox = NULL) : void {
// Views is optional and may not be enabled on minimal installations.
if (!\Drupal::moduleHandler()->moduleExists('views')) {
return;
}
/** @var \Drupal\views\ViewsConfigUpdater $view_config_updater */
$view_config_updater = \Drupal::classResolver(ViewsConfigUpdater::class);
$view_config_updater->setDeprecationsEnabled(FALSE);
\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'view', function (ViewEntityInterface $view) use ($view_config_updater) : bool {
return $view_config_updater->needsBlockContentListingEmptyUpdate($view);
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.