protected function addBlockToSlot($dir, array $options)
    {
        $slot = $this->getSlotDefinition($dir);
        $blocks = $slot["blocks"];
        $blockName = $options["blockname"];
        $position = $options["position"];
        array_splice($blocks, $position, 0, $blockName);

        $slot["next"] = str_replace('block', '', $blockName) + 1;
        $slot["blocks"] = $blocks;

        $this->saveSlotDefinition($dir, $slot);

        return $blockName;
    }