framework/RedKiteCms/Content/SlotsManager/SlotsManager.php
protected function generateSlot($path, $blocks = array(), $username = null)
    {
        if (is_dir($path) && !$this->override) {
            return;
        }

        $folders = array();
        $activeDir = $path . '/active';
        $contributorsDir = $path . '/contributors';
        $folders[] = $activeDir . '/blocks';
        $folders[] = $activeDir . '/archive';
        $folders[] = $contributorsDir;

        $targetDir = $activeDir;
        $blocksDir = $activeDir . '/blocks';
        if (null !== $username) {
            $targetDir = $contributorsDir . '/' . $username;
            $blocksDir = $targetDir . '/blocks';
            $folders[] = $targetDir;
            $folders[] = $targetDir . '/archive';
            $folders[] = $blocksDir;
        }

        $this->filesystem->mkdir($folders);
        $this->generateBlocks($blocks, $blocksDir, $targetDir);
    }
protected function generateSlot($path, $blocks = array(), $username = null)
    {
        if (is_dir($path) && !$this->override) {
            return;
        }

        $folders = array();
        $activeDir = $path . '/active';
        $contributorsDir = $path . '/contributors';
        $folders[] = $activeDir . '/blocks';
        $folders[] = $activeDir . '/archive';
        $folders[] = $contributorsDir;

        $targetDir = $activeDir;
        $blocksDir = $activeDir . '/blocks';
        if (null !== $username) {
            $targetDir = $contributorsDir . '/' . $username;
            $blocksDir = $targetDir . '/blocks';
            $folders[] = $targetDir;
            $folders[] = $targetDir . '/archive';
            $folders[] = $blocksDir;
        }

        $this->filesystem->mkdir($folders);
        $this->generateBlocks($blocks, $blocksDir, $targetDir);
    }
Generates a new slot

@param string $path
@param array $blocks
@param string|null $username