Beispiel #1
0
 public function preInsert(PropelPDO $con = null)
 {
     $this->setDepth($this->getDepth());
     if ($this->getParentId()) {
         $this->setRootParentId($this->getRootParentId());
     }
     $this->setChildrenCount(0);
     $this->setDirectChildrenCount(0);
     return parent::preInsert($con);
 }
Beispiel #2
0
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     CuePointPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new CuePointPeer();
     }
     return self::$peer;
 }
 public function postUpdate(PropelPDO $con = null)
 {
     if ($this->alreadyInSave) {
         return parent::postUpdate($con);
     }
     $objectUpdated = $this->isModified();
     $objectDeleted = false;
     if ($this->isColumnModified(CuePointPeer::STATUS) && $this->getStatus() == CuePointStatus::DELETED) {
         $objectDeleted = true;
     }
     $ret = parent::postUpdate($con);
     if ($objectDeleted) {
         kEventsManager::raiseEvent(new kObjectDeletedEvent($this));
     }
     if ($objectUpdated) {
         kEventsManager::raiseEvent(new kObjectUpdatedEvent($this));
     }
     return $ret;
 }