public function save()
{
/**
* No one can edit an event
*/
if ($this->getId() !== null) {
return true;
}
$arraySave = array('created_at' => new Expression('NOW()'), 'content' => $this->getContent(), 'template_id' => $this->getTemplateId(), 'user_id' => $this->getUserId());
try {
$this->insert($arraySave);
$this->setId((int) $this->getLastInsertId());
return $this->getId();
} catch (\Exception $e) {
throw new \Gc\Exception($e->getMessage(), $e->getCode(), $e);
}
}