/** * @param JEleveCpe $jEleveCpe The jEleveCpe object to add. */ protected function doAddJEleveCpe($jEleveCpe) { $this->collJEleveCpes[]= $jEleveCpe; $jEleveCpe->setEleve($this); }
/** * Ajoute un eleve au cpe ou au professeur principal * le statut doit etre cpe ou professeur * * @param Eleve $eleve The JEleveCpe object to relate * @return void */ public function addEleve($eleve) { if ($this->statut != "cpe" && $this->statut != "professeur") { throw new PropelException("le statut de l'utilisateur doit etre cpe ou professeur"); } if ($this->collEleves === null) { $this->initEleves(); } if (!$this->collEleves->contains($eleve)) { // only add it if the **same** object is not already associated if ($this->statut == "cpe") { $jEleveCpe = new JEleveCpe(); $jEleveCpe->setEleve($eleve); $this->addJEleveCpe($jEleveCpe); $this->collEleves[]= $eleve; } else if ($this->statut == "professeur") { $jEleveProfesseurPrincipal = new JEleveProfesseurPrincipal(); $jEleveProfesseurPrincipal->setEleve($eleve); $this->addJEleveProfesseurPrincipal($jEleveProfesseurPrincipal); $this->collEleves[]= $eleve; } } }
/** * Filter the query by a related JEleveCpe object * * @param JEleveCpe $jEleveCpe the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return UtilisateurProfessionnelQuery The current query, for fluid interface */ public function filterByJEleveCpe($jEleveCpe, $comparison = null) { if ($jEleveCpe instanceof JEleveCpe) { return $this ->addUsingAlias(UtilisateurProfessionnelPeer::LOGIN, $jEleveCpe->getCpeLogin(), $comparison); } elseif ($jEleveCpe instanceof PropelCollection) { return $this ->useJEleveCpeQuery() ->filterByPrimaryKeys($jEleveCpe->getPrimaryKeys()) ->endUse(); } else { throw new PropelException('filterByJEleveCpe() only accepts arguments of type JEleveCpe or PropelCollection'); } }
/** * @param JEleveCpe $jEleveCpe The jEleveCpe object to add. */ protected function doAddJEleveCpe($jEleveCpe) { $this->collJEleveCpes[]= $jEleveCpe; $jEleveCpe->setUtilisateurProfessionnel($this); }
/** * Exclude object from result * * @param JEleveCpe $jEleveCpe Object to remove from the list of results * * @return JEleveCpeQuery The current query, for fluid interface */ public function prune($jEleveCpe = null) { if ($jEleveCpe) { $this->addCond('pruneCond0', $this->getAliasedColName(JEleveCpePeer::E_LOGIN), $jEleveCpe->getELogin(), Criteria::NOT_EQUAL); $this->addCond('pruneCond1', $this->getAliasedColName(JEleveCpePeer::CPE_LOGIN), $jEleveCpe->getCpeLogin(), Criteria::NOT_EQUAL); $this->combine(array('pruneCond0', 'pruneCond1'), Criteria::LOGICAL_OR); } return $this; }