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