public function manageAction() { $Id = (int) $this->_getParam('id'); if ($Id == 0) { $this->_flash($this->getBacklink(), $this->getMessage('noentity')); } $foto = new Foto(); $this->view->galery = $this->_model->getById($Id); $this->view->list = $foto->getTable()->findByGaleries_Id($Id); }