public function checkSaveNewEmploye(DocType $doc) { if (!$doc->isKnownSignataire2()) { $employe = $doc->getNewSignataire2(); $this->em->persist($employe->getPersonne()); $employe->setProspect($doc->getEtude()->getProspect()); $employe->getPersonne()->setEmploye($employe); $this->em->persist($employe); $doc->setSignataire2($employe->getPersonne()); } }
private function trieDateSignature(DocType $a, DocType $b) { if ($a->getDateSignature() == $b->getDateSignature()) { return 0; } else { return $a->getDateSignature() < $b->getDateSignature() ? -1 : 1; } }