/** * List of categories * * @param Category $category Category * * @return array * * @Route("/services/{slug}", name="portfolio_categories_list") * @ParamConverter("category", class="StfalconPortfolioBundle:Category", options={"mapping": {"slug": "slug"}}) * @Template() */ public function servicesAction(Category $category) { $repository = $this->getDoctrine()->getManager()->getRepository('StfalconPortfolioBundle:Category'); $categories = $repository->getServicesCategories(); $linkTexts = array('web-development' => 'веб-разработки', 'web-design' => 'разработки дизайна', 'mobile-development' => 'разработки мобильных приложений', 'game-development' => 'создания игр', 'consulting-audit' => 'консалтинга и аудита'); $seo = $this->get('sonata.seo.page'); $seo->addMeta('name', 'description', $category->getMetaDescription())->addMeta('name', 'keywords', $category->getMetaKeywords())->addMeta('property', 'og:url', $this->generateUrl('portfolio_categories_list', ['slug' => $category->getSlug()], true))->addMeta('property', 'og:title', $category->getTitle())->addMeta('property', 'og:description', $category->getMetaDescription()); return array('category' => $category, 'categories' => $categories, 'linkTexts' => $linkTexts); }