public function addHistoryEvent($title, $text) { sfContext::getInstance()->getLogger()->info('grabbing project history group'); $group = $this->getHistoryGroup(); $event = new HistoryEvent(); $event->setTitle($title); $event->setText($text); $event->setHistoryGroupId($group->getId()); sfContext::getInstance()->getLogger()->info('adding event'); $event->save(); $group->addHistoryEvent($event); $event->save(); }
public function addHistoryEvent($title, $text, $category = 'general') { sfContext::getInstance()->getLogger()->info('grabbing user history group'); $group = $this->getHistoryGroup(); $event = new HistoryEvent(); $event->setTitle($title); $event->setText($text); $event->setCategory($category); $event->setHistoryGroupId($group->getId()); $event->setUserId($this->getUserId()); sfContext::getInstance()->getLogger()->info('adding event'); $event->save(); $group->addHistoryEvent($event); $event->save(); }