c73ce03150462467bd230da5fc5a2ff39aa8eff6
[mixstore.git] / src / Mixstore / StaticBundle / Controller / MainController.php
1 <?php
2
3 namespace Mixstore\StaticBundle\Controller;
4
5 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
7 class MainController extends Controller
8 {
9 public function homeAction()
10 {
11 $pkgRepository = $this
12 ->getDoctrine()
13 ->getManager()
14 ->getRepository('MixstoreStoreBundle:Package');
15
16 //get news
17 $news = $pkgRepository
18 ->getLastNews();
19
20 //get images sources for carousel
21 $bannersArray = $pkgRepository
22 ->getBannersUrls();
23
24 return $this->render('MixstoreStaticBundle::home.html.twig', array(
25 'bannersArray' => $bannersArray,
26 'news' => $news,
27 ));
28 }
29
30 public function aboutAction()
31 {
32 return $this->render('MixstoreStaticBundle::about.html.twig');
33 }
34
35 public function policyAction()
36 {
37 return $this->render('MixstoreStaticBundle::policy.html.twig');
38 }
39 }