public function delete($con = null) { try { $con = Propel::getConnection(); $con->begin(); //deletes generic document $genericDocument = Document::getGenericDocument($this); $genericDocument->delete(); //deletes any tags for this document $c = new Criteria(); $c->add(TagrelationPeer::TAG_ID, $this->getId()); $tagRelations = TagrelationPeer::doSelect($c); foreach ($tagRelations as $tag) { $tag->delete(); } parent::delete(); $con->commit(); if (sfConfig::get('sf_cache_relations')) { Tagrelation::updateTagRelationCache(); } Document::deleteObjCache($this); return true; } catch (Exception $e) { $con->rollback(); throw $e; } }
public function postUpdate(PropelPDO $con = null) { parent::postUpdate($con); if (!$this->alreadyInSave) { kEventsManager::raiseEvent(new kObjectUpdatedEvent($this)); } }
/** * Construct the tag. * * @param string $location * @param string $lastModified * @param string $changeFrequency * @param string $priority * @return void */ public function __construct($location, $lastModified = null, $changeFrequency = null, $priority = null, $multiLangual = null) { parent::__construct($location, $lastModified); $this->changeFrequency = $changeFrequency; $this->priority = $priority; $this->multilang = $multiLangual; }
/** * Construct the tag. * * @param string $location * @param string $lastModified * @param string $changeFrequency * @param string $priority * @return void */ public function __construct($location, $lastModified = null, $changeFrequency = null, $priority = null, $image = null) { parent::__construct($location, $lastModified); $this->changeFrequency = $changeFrequency; $this->priority = $priority; $this->image = $image; }
public function getPeer() { if (self::$peer === null) { self::$peer = new TagPeer(); } return self::$peer; }
public function setName($sNewName) { $sNewName = StringUtil::normalize($sNewName); parent::setName($sNewName); }
public function setUp() { $this->hasMany('TagObiect', array('local' => 'id', 'foreign' => 'tag')); parent::setUp(); }
public function setTag($v) { parent::setTag($v); $this->setNormalizedTag($v); }
public function init() { return parent::init(); }