public function save(Default_Model_EmailTemplates $value) { $data = array('type' => $value->getType(), 'const' => $value->getConst(), 'subject' => $value->getSubject(), 'content' => $value->getContent()); if (null === ($id = $value->getId())) { $id = $this->getDbTable()->insert($data); } else { $this->getDbTable()->update($data, array('id = ?' => $id)); } return $id; }