framework/RedKiteCms/Content/BlockManager/BlockManagerAdd.php
public function add($sourceDir, array $options, $username)
    {
        $this->resolveAddOptions($options);
        $this->createContributorDir($sourceDir, $options, $username);

        $dir = $this
            ->init($sourceDir, $options, $username)
            ->getDirInUse()
        ;
        $blockName = $this->addBlockToSlot($dir, $options);
        $blockContent = $this->addBlock($dir, $options, $blockName);

        DataLogger::log(
            sprintf(
                'Block "%s" has been added to the "%s" slot on page "%s" for the "%s_%s" language',
                $blockName,
                $options["slot"],
                $options["page"],
                $options["language"],
                $options["country"]
            )
        );

        return $blockContent;
    }
public function add($sourceDir, array $options, $username)
    {
        $this->resolveAddOptions($options);
        $this->createContributorDir($sourceDir, $options, $username);

        $dir = $this
            ->init($sourceDir, $options, $username)
            ->getDirInUse()
        ;
        $blockName = $this->addBlockToSlot($dir, $options);
        $blockContent = $this->addBlock($dir, $options, $blockName);

        DataLogger::log(
            sprintf(
                'Block "%s" has been added to the "%s" slot on page "%s" for the "%s_%s" language',
                $blockName,
                $options["slot"],
                $options["page"],
                $options["language"],
                $options["country"]
            )
        );

        return $blockContent;
    }
Adds the block to the slot for the given language and page

@param string $sourceDir
@param array $options
@param string $username

@return string The saved content