Ejemplo n.º 1
0
 public function saveDocenteHorarioList($con = null)
 {
     if (!$this->isValid()) {
         throw $this->getErrorSchema();
     }
     if (!isset($this->widgetSchema['docente_horario_list'])) {
         // somebody has unset this widget
         return;
     }
     if (is_null($con)) {
         $con = $this->getConnection();
     }
     $c = new Criteria();
     $c->add(DocenteHorarioPeer::FK_DOCENTE_ID, $this->object->getPrimaryKey());
     DocenteHorarioPeer::doDelete($c, $con);
     $values = $this->getValue('docente_horario_list');
     if (is_array($values)) {
         foreach ($values as $value) {
             $obj = new DocenteHorario();
             $obj->setFkDocenteId($this->object->getPrimaryKey());
             $obj->setFkEventoId($value);
             $obj->save();
         }
     }
 }
Ejemplo n.º 2
0
 public static function addInstanceToPool(DocenteHorario $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = serialize(array((string) $obj->getFkDocenteId(), (string) $obj->getFkEventoId()));
         }
         self::$instances[$key] = $obj;
     }
 }