Esempio n. 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);
 }
Esempio n. 2
0
 public function delete()
 {
     $q = Doctrine_Query::create()->delete('EventoPhoto')->addWhere('evento_id = ?', $this->id);
     $deleted = $q->execute();
     parent::delete();
 }
Esempio n. 3
0
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new EventoPeer();
     }
     return self::$peer;
 }