public function indexAction()
{
return new ViewModel(array(
- 'Galerie_all' => $this->_getGalerieTable()->all(),
- 'Galerie_one' => $this->_getGalerieTable()->get(1),
- 'GalerieInfo_all' => $this->_getGalerieInfoTable()->select(),
- 'GalerieInfo_one' => $this->_getGalerieInfoTable()->select(array('gallery.id' => 1))->current(),
- 'GalerieInfo_usr' => $this->_getGalerieInfoTable()->select(array('gallery.id_user' => 1)),
+ 'galeries' => $this->_getGalerieInfoTable()->all(),
));
}
}
public function viewAction()
- {
- return array();
+ {
+ $id = $this->params()->fromRoute('id', null);
+ $galerie = $this->_getGalerieInfoTable()->any($id);
+ return new ViewModel(array(
+ 'id' => $id,
+ 'galerie' => $galerie,
+ ));
}
+
}