X-Git-Url: http://git.inspyration.org/?a=blobdiff_plain;f=module%2FGalerie%2Fsrc%2FGalerie%2FController%2FIndexController.php;h=8d33090aa2763ccc1c36589e75ae334d6b109fe2;hb=477f62c0b8380aaa9fd2ab2e05dd2c85468aeeec;hp=2f28c98cb2b02f6be4da91cc10b7183d977fa710;hpb=8bd8f746674c0992e71e1a6952d0d37580291930;p=zf2.biz%2Fgalerie.git diff --git a/module/Galerie/src/Galerie/Controller/IndexController.php b/module/Galerie/src/Galerie/Controller/IndexController.php index 2f28c98..8d33090 100644 --- a/module/Galerie/src/Galerie/Controller/IndexController.php +++ b/module/Galerie/src/Galerie/Controller/IndexController.php @@ -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, + )); } + }