/**
  * @param NodeInterface $node
  * @param NodeInterface $newNode
  *
  * @return NodeInterface
  */
 protected function duplicateBlockAndArea(NodeInterface $node, NodeInterface $newNode)
 {
     foreach ($node->getAreas() as $areaId => $area) {
         $newArea = clone $area;
         $newNode->setArea($areaId, $newArea);
         foreach ($area->getBlocks() as $block) {
             if (!$block->isTransverse()) {
                 $newBlock = clone $block;
                 $this->blockRepository->getDocumentManager()->persist($newBlock);
                 $newArea->addBlock($newBlock);
             }
         }
     }
     return $newNode;
 }