Exemplo n.º 1
0
 public function delete(PropelPDO $con = null)
 {
     parent::delete($con);
     $logEntry = new Log();
     $logEntry->setWhen(time());
     $logEntry->setPropelClass("Job");
     $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId());
     $logEntry->setMessage("Job deleted.");
     $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_delete"));
     $logEntry->setPropelId($this->getId());
     $logEntry->save();
     if (!is_null($this->getGCalId())) {
         sfGCalendar::deleteEventById($this->getGCalId());
     }
     if (!is_null($this->getGCalIdCustom())) {
         sfGCalendar::deleteEventById($this->getGCalIdCustom());
     }
 }