/** * Check collision * * @return string|null Store-like message */ function checkCollisions() { $this->completeField("sejour_id"); if (!$this->sejour_id) { return null; } $affectation = new CAffectation(); $affectation->sejour_id = $this->sejour_id; $affectations = $affectation->loadMatchingList(); unset($affectations[$this->_id]); foreach ($affectations as $_aff) { if ($this->collide($_aff)) { return "Placement déjà effectué"; } } return null; }