framework/RedKiteCms/Rendering/PageRenderer/PageRendererProduction.php
public function renderBlock($encodedBlock)
    {
        $values = json_decode($encodedBlock, true);
        if (!array_key_exists("type", $values) || null === $values["type"]) {
            return "";
        }

        $block = $this->serializer->deserialize($encodedBlock, BlockFactory::getBlockClass($values["type"]), 'json');
        $blockTemplate = $this->fetchTemplateBlock($block);
        $content = $this->templating->render($blockTemplate, array('block' => $block));

        // Looks for images
        $this->updateMediaFiles('src', $content);

        // Looks for files
        $this->updateMediaFiles('href', $content);

        return $content;
    }
public function renderBlock($encodedBlock)
    {
        $values = json_decode($encodedBlock, true);
        if (!array_key_exists("type", $values) || null === $values["type"]) {
            return "";
        }

        $block = $this->serializer->deserialize($encodedBlock, BlockFactory::getBlockClass($values["type"]), 'json');
        $blockTemplate = $this->fetchTemplateBlock($block);
        $content = $this->templating->render($blockTemplate, array('block' => $block));

        // Looks for images
        $this->updateMediaFiles('src', $content);

        // Looks for files
        $this->updateMediaFiles('href', $content);

        return $content;
    }
Renders a block from a encoded json content
@param $encodedBlock

@return string