public function renderBlock($name)
    {
        /** @var Block $block */
        $block = $this->repositories['block']->findOneBy(array('name' => $name));
        if (!$block || (!$block->isPublished() && !$this->security->isGranted('ROLE_ADMIN'))) {
            return;
        }

        return $block->getContents();
    }