public function getCategories(Request $request, $className)
    {
        $context = array();

        $categoryRepository = $this->em->getRepository($className);
        $context['categories'] = $categoryRepository->findBy(array(), array('name' => 'ASC'));

        $searchCategory = $request->get('category') ? explode(',', $request->get('category')) : null;
        if ($searchCategory) {
            $context['activeCategory'] = true;
            $context['activeCategories'] = $searchCategory;
        }

        return $context;
    }