1 layout.class.inc Layout::removeBlock($block_uuid)

Remove a block from a layout.

Parameters

string $block_uuid: The UUID of the block being removed.

File

core/modules/layout/includes/layout.class.inc, line 515
Class for loading, modifying, and executing a layout.

Class

Layout
@file Class for loading, modifying, and executing a layout.

Code

function removeBlock($block_uuid) {
  unset($this->content[$block_uuid]);
  foreach ($this->positions as $region => $positions) {
    $key = array_search($block_uuid, $positions);
    if ($key !== FALSE) {
      unset($this->positions[$region][$key]);
      unset($this->content[$block_uuid]);
    }
  }

}