Galerie/Index Message d'erreur personnalisé
[zf2.biz/galerie.git] / module / Galerie / src / Galerie / Controller / IndexController.php
index 2f28c98..8d33090 100644 (file)
@@ -34,7 +34,7 @@ class IndexController extends AbstractActionController
     public function indexAction() 
     { 
         return new ViewModel(array(
-            'all' => $this->_getGalerieInfoTable()->all(),
+            'galeries' => $this->_getGalerieInfoTable()->all(),
         )); 
     } 
 
@@ -49,7 +49,13 @@ class IndexController extends AbstractActionController
     } 
 
     public function viewAction() 
-    { 
-        return array(); 
+    {
+        $id = $this->params()->fromRoute('id', null);
+        $galerie = $this->_getGalerieInfoTable()->any($id);
+        return new ViewModel(array(
+            'id' => $id,
+            'galerie' => $galerie,
+        ));
     } 
+
 }