function action_editRelease(Integer $id, array $data = null, $action = null) { $release = PhoebiusRelease::dao()->getEntityById($id->getValue()); if ($action == 'Delete') { $release->drop(); return $this->redirect('adminReleases'); } else { if ($action == 'Save' && is_array($data)) { $this->fillRelease($data, $release); $release->save(); return $this->redirect('adminEditRelease', array('id' => $release->getId())); } } $this->getModel()->append(array('release' => $release)); return 'admin/release'; }