~theo-voisin/+junk/cnrs

« back to all changes in this revision

Viewing changes to src/Tofsims/TofsimsBundle/Controller/TofsimsController.php

  • Committer: jeremy.lherbe at univ-orleans
  • Date: 2013-03-04 13:04:35 UTC
  • mfrom: (16.1.5 cnrs)
  • Revision ID: jeremy.lherbe@etu.univ-orleans.fr-20130304130435-eubg572opparqd3o
mergeĀ avecĀ pascal

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
class TofsimsController extends Controller
9
9
{
10
 
    public function indexAction()
11
 
    {
12
 
        $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Alert');
13
 
        $liste_alert = $repository->findAll();
14
 
        $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Post');
15
 
        $liste_post = $repository->findAll();
16
 
 
 
10
    public function indexAction(){
 
11
        
 
12
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Alert');
 
13
                $liste_alert = $repository->findAll();
 
14
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Post');
 
15
                $liste_post = $repository->findBy(array('section'=>'accueil'));
17
16
 
18
17
        return $this->render('TofsimsTofsimsBundle:Tofsims:index.html.twig', array('liste_alert' => $liste_alert, 'liste_post' => $liste_post));
19
18
    }
20
19
        
21
20
        
22
 
         public function articleAction()
23
 
    {
24
 
        $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Article');
25
 
        $liste_article = $repository->findAll();
26
 
        
27
 
        
28
 
        return $this->render('TofsimsTofsimsBundle:Tofsims:article.html.twig', array('liste_article' => $liste_article));
 
21
        public function articleAction(){
 
22
         
 
23
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Article');
 
24
                $liste_article = $repository->findAll();        
 
25
                
 
26
                return $this->render('TofsimsTofsimsBundle:Tofsims:article.html.twig', array('liste_article' => $liste_article));
29
27
    }
30
28
        
 
29
        public function presentation_principeAction(){  
 
30
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Post');
 
31
                $liste_post = $repository->findBy(array('section'=>'principe'));                        
 
32
                return $this->render('TofsimsTofsimsBundle:Tofsims:presentation_principe.html.twig', array('liste_post' => $liste_post));       
 
33
        }
 
34
        
 
35
        public function presentation_videoAction(){     
 
36
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Post');
 
37
                $liste_post = $repository->findBy(array('section'=>'video'));                   
 
38
                return $this->render('TofsimsTofsimsBundle:Tofsims:presentation_video.html.twig', array('liste_post' => $liste_post));  
 
39
        }
 
40
        
 
41
        public function presentation_clusterAction(){   
 
42
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Post');
 
43
                $liste_post = $repository->findBy(array('section'=>'cluster'));                 
 
44
                return $this->render('TofsimsTofsimsBundle:Tofsims:presentation_cluster.html.twig', array('liste_post' => $liste_post));        
 
45
        }
 
46
        
 
47
        public function presentation_coutAction(){      
 
48
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Post');
 
49
                $liste_post = $repository->findBy(array('section'=>'cout'));                    
 
50
                return $this->render('TofsimsTofsimsBundle:Tofsims:presentation_cout.html.twig', array('liste_post' => $liste_post));   
 
51
        }       
 
52
        
 
53
        public function presentation_compAction(){      
 
54
                $repository = $this->getDoctrine()->getManager()->getRepository('TofsimsTofsimsBundle:Post');
 
55
                $liste_post = $repository->findBy(array('section'=>'comp'));                    
 
56
                return $this->render('TofsimsTofsimsBundle:Tofsims:presentation_comp.html.twig', array('liste_post' => $liste_post));   
 
57
        }
 
58
        
31
59
        
32
60
}