public function getInstance($id = NULL) { $obj = parent::getInstance($id); if (null == $obj->getType()) { $obj->setType("intervention"); } if ($obj->getStatut() === NULL) { $statut = DAO::getOne("Statut", 1); $obj->setStatut($statut); } if ($obj->getUser() === NULL) { $obj->setUser(Auth::getUser()); } if ($obj->getDateCreation() === NULL) { $obj->setdateCreation(date('Y-m-d H:i:s')); } return $obj; }
public function getInstance($id = NULL) { $obj = parent::getInstance($id); if ($obj->getUser() === NULL) { $obj->setUser(Auth::getUser()); } if ($obj->getDateCreation() === NULL) { $obj->setdateCreation(date('d-m-Y H:i:s')); } return $obj; }