framework/RedKiteCms/Content/BlockManager/BlockManagerMove.php
private function changeBlockSlotAndName($targetFile, $blockName, $slotName)
    {
        $block = json_decode(FilesystemTools::readFile($targetFile), true);
        $block["name"] = $blockName;
        $block["slot_name"] = $slotName;
        $json = json_encode($block);
        FilesystemTools::writeFile($targetFile, $json);

        return $block;
    }
private function changeBlockSlotAndName($targetFile, $blockName, $slotName)
    {
        $block = json_decode(FilesystemTools::readFile($targetFile), true);
        $block["name"] = $blockName;
        $block["slot_name"] = $slotName;
        $json = json_encode($block);
        FilesystemTools::writeFile($targetFile, $json);

        return $block;
    }
Changes the block and slot name when moving to another slot

@param string $targetFile
@param string $blockName
@param string $slotName

@return array The new block