Example #1
0
 public function save(PropelPDO $con = null)
 {
     $producto = $this->getProducto();
     if ($this->getOperacion()) {
         $producto->incrementarStock($this->getCantidad());
     } else {
         $producto->decrementarStock($this->getCantidad());
     }
     parent::save($con);
 }
Example #2
0
 public function delete()
 {
     $q = Doctrine_Query::create()->delete('EventoPhoto')->addWhere('evento_id = ?', $this->id);
     $deleted = $q->execute();
     parent::delete();
 }
Example #3
0
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new EventoPeer();
     }
     return self::$peer;
 }