protected function getBlog(Request $request, $blogId)
    {
        /** @var BlogRepository $blogRepo */
        $blogRepo = $this->get('doctrine.orm.entity_manager')->getRepository('VictoireBlogBundle:Blog');

        if ($blogId) {
            $blog = $blogRepo->find($blogId);
        } else {
            $blogs = $blogRepo->joinTranslations($request->getLocale())->run();
            $blog = reset($blogs);
        }

        return $blog;
    }