public function indexAction(Request $request, $blog = null, $tab = 'articles')
    {
        /** @var BlogRepository $blogRepo */
        $blogRepo = $this->get('doctrine.orm.entity_manager')->getRepository('VictoireBlogBundle:Blog');

        // Default value for locale
        $locale = $request->getLocale();

        // Overwrite locale when a locale is chosen in the form
        if ($chooseBlog = $request->request->get('choose_blog')) {
            if (array_key_exists('locale', $chooseBlog)) {
                $locale = $chooseBlog['locale'];
            }
        }

        $parameters = [
            'locale'             => $locale,
            'blog'               => $blog,
            'currentTab'         => $tab,
            'tabs'               => ['articles', 'drafts', 'settings', 'category'],
            'businessProperties' => $blog ? $this->getBusinessProperties($blog) : null,
        ];
        if ($blogRepo->hasMultipleBlog()) {
            $chooseBlogForm = $this->createForm(ChooseBlogType::class, null, [
                'blog'   => $blog,
                'locale' => $locale,
            ]);
            $chooseBlogForm->handleRequest($request);
            $parameters = array_merge(
                $parameters,
                ['chooseBlogForm' => $chooseBlogForm->createView()],
                $chooseBlogForm->getData()
            );
        }

        return $this->render(
            'VictoireBlogBundle:Blog:index.html.twig',
            $parameters
        );
    }