public function createCopy($mode) { // Disable Layout Builder and remove any sections copied from the original.
return parent::
createCopy($mode) ->
setSections([]) ->
disableLayoutBuilder();
} /**
* {@inheritdoc}
*/
protected function getDefaultRegion() { if ($this->
hasSection(0
)) { return $this->
getSection(0
)->
getDefaultRegion();
} return parent::
getDefaultRegion();
} /**
* Wraps the context repository service.
*
* @return \Drupal\Core\Plugin\Context\ContextRepositoryInterface
* The context repository service.
*/