1 block.class.inc | Block::getClone() |
Clone this block to give it a new UUID but the same configuration.
File
- core/
modules/ layout/ includes/ block.class.inc, line 329 - A class that wraps around a block to store settings information.
Class
- Block
- @file A class that wraps around a block to store settings information.
Code
function getClone() {
$new_block = clone $this;
$uuid = new Uuid();
$new_block->uuid = $uuid->generate();
$new_block->is_new = TRUE;
return $new_block;
}