/**
	 * Filter the query by a related CahierTexteSequence object
	 *
	 * @param     CahierTexteSequence|PropelCollection $cahierTexteSequence The related object(s) to use as filter
	 * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
	 *
	 * @return    CahierTexteCompteRenduQuery The current query, for fluid interface
	 */
	public function filterByCahierTexteSequence($cahierTexteSequence, $comparison = null)
	{
		if ($cahierTexteSequence instanceof CahierTexteSequence) {
			return $this
				->addUsingAlias(CahierTexteCompteRenduPeer::ID_SEQUENCE, $cahierTexteSequence->getId(), $comparison);
		} elseif ($cahierTexteSequence instanceof PropelCollection) {
			if (null === $comparison) {
				$comparison = Criteria::IN;
			}
			return $this
				->addUsingAlias(CahierTexteCompteRenduPeer::ID_SEQUENCE, $cahierTexteSequence->toKeyValue('PrimaryKey', 'Id'), $comparison);
		} else {
			throw new PropelException('filterByCahierTexteSequence() only accepts arguments of type CahierTexteSequence or PropelCollection');
		}
	}
	/**
	 * Exclude object from result
	 *
	 * @param     CahierTexteSequence $cahierTexteSequence Object to remove from the list of results
	 *
	 * @return    CahierTexteSequenceQuery The current query, for fluid interface
	 */
	public function prune($cahierTexteSequence = null)
	{
		if ($cahierTexteSequence) {
			$this->addUsingAlias(CahierTexteSequencePeer::ID, $cahierTexteSequence->getId(), Criteria::NOT_EQUAL);
		}

		return $this;
	}
Example #3
0
 $sequence->save();
 // Maintenant on peut relier les compte-rendus avec cette séquence
 $nbre = count($cr);
 for ($i = 0; $i < $nbre; $i++) {
     // On vérifie si le CR est bien renseigné ainsi que sa date
     if ($dateseance[$i] == '') {
         // On ne fait rien, on n'enregistre pas un CR sans date
     } else {
         $contenu = $cr[$i] == '' ? '...' : $cr[$i];
         // pour rester cohérent avec le module cdt
         // On formate la date demandée
         $test_date = explode("/", $dateseance[$i]);
         $ts_seance = mktime(0, 0, 0, $test_date[1], $test_date[0], $test_date[2]);
         // on enregistre alors ce CR
         $seance = new CahierTexteCompteRendu();
         $seance->setIdSequence($sequence->getId());
         $seance->setHeureEntry(date("H:i:s", date("U")));
         $seance->setIdGroupe($enseignement);
         $seance->setDateCt($ts_seance);
         $seance->setIdLogin($_SESSION["login"]);
         $seance->setContenu($contenu);
         if ($seance->save()) {
             //$verif = 'yes';
             $nb_reg++;
         } else {
             $verif = 'no';
         }
     }
 }
 // Gestion des erreurs//@TODO pas encore utilisé dans la page de retour
 if ($verif == 'no') {
	/**
	 * Declares an association between this object and a CahierTexteSequence object.
	 *
	 * @param      CahierTexteSequence $v
	 * @return     CahierTexteTravailAFaire The current object (for fluent API support)
	 * @throws     PropelException
	 */
	public function setCahierTexteSequence(CahierTexteSequence $v = null)
	{
		if ($v === null) {
			$this->setIdSequence(0);
		} else {
			$this->setIdSequence($v->getId());
		}

		$this->aCahierTexteSequence = $v;

		// Add binding for other direction of this n:n relationship.
		// If this object has already been added to the CahierTexteSequence object, it will not be re-added.
		if ($v !== null) {
			$v->addCahierTexteTravailAFaire($this);
		}

		return $this;
	}