Browse Source

Mise en config les données brutes d'initialisation de l'objet ElementSearch

bastien 13 years ago
parent
commit
192895b874

+ 0 - 1
src/Muzich/CoreBundle/Searcher/ElementSearcher.php View File

30
   
30
   
31
   /**
31
   /**
32
    * Nombre limite de résultats retournés.
32
    * Nombre limite de résultats retournés.
33
-   * TODO: Placer cette info dans la config.
34
    * 
33
    * 
35
    * @var int
34
    * @var int
36
    */
35
    */

+ 5 - 2
src/Muzich/CoreBundle/lib/Controller.php View File

51
       $this->ElementSearcher = new ElementSearcher();
51
       $this->ElementSearcher = new ElementSearcher();
52
       $this->ElementSearcher->init(array(
52
       $this->ElementSearcher->init(array(
53
         'tags' => $this->getDoctrine()->getRepository('MuzichCoreBundle:User')
53
         'tags' => $this->getDoctrine()->getRepository('MuzichCoreBundle:User')
54
-        // TODO: 3: CONFIG !!
55
-        ->getTagIdsFavorites($this->getUserId(), 3)
54
+          ->getTagIdsFavorites(
55
+            $this->getUserId(),
56
+            $this->container->getParameter('search_default_favorites_tags_count')
57
+          ),
58
+        'count' => $this->container->getParameter('search_default_count')
56
       ));
59
       ));
57
 
60
 
58
       // Et on met en session les paramètres
61
       // Et on met en session les paramètres