function BlockConfigUpdater::updateBlock

Performs the required update.

Parameters

\Drupal\block\BlockInterface $block: The block to update.

Return value

bool Whether the block was updated.

File

core/modules/block/src/BlockConfigUpdater.php, line 47

Class

BlockConfigUpdater
Provides a BC layer for modules providing old configurations.

Namespace

Drupal\block

Code

public function updateBlock(BlockInterface $block) : bool {
  $changed = FALSE;
  if ($this->needsInfoStatusSettingsRemoved($block)) {
    $settings = $block->get('settings');
    unset($settings['info'], $settings['status']);
    $block->set('settings', $settings);
    $changed = TRUE;
  }
  return $changed;
}

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