function block_content_post_update_remove_block_content_status_info_keys
Remove deprecated status and info keys from block_content blocks.
File
-
core/
modules/ block_content/ block_content.post_update.php, line 31
Code
function block_content_post_update_remove_block_content_status_info_keys(array &$sandbox = []) : void {
/** @var \Drupal\block\BlockConfigUpdater $blockConfigUpdater */
$blockConfigUpdater = \Drupal::service(BlockConfigUpdater::class);
$blockConfigUpdater->setDeprecationsEnabled(FALSE);
\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'block', function (BlockInterface $block) use ($blockConfigUpdater) : bool {
return $blockConfigUpdater->needsInfoStatusSettingsRemoved($block);
});
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.