public function BlockInterface::createDuplicateBlock in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/block/src/BlockInterface.php \Drupal\block\BlockInterface::createDuplicateBlock()
Creates a duplicate of the block entity.
Parameters
string $new_id: (optional) The new ID on the duplicate block.
string $new_theme: (optional) The theme on the duplicate block.
Return value
static A clone of $this with all identifiers unset, so saving it inserts a new entity into the storage system.
1 method overrides BlockInterface::createDuplicateBlock()
- Block::createDuplicateBlock in core/
modules/ block/ src/ Entity/ Block.php - Creates a duplicate of the block entity.
File
- core/
modules/ block/ src/ BlockInterface.php, line 138 - Contains \Drupal\block\BlockInterface.
Class
- BlockInterface
- Provides an interface defining a block entity.
Namespace
Drupal\blockCode
public function createDuplicateBlock($new_id = NULL, $new_theme = NULL);