public function delete(Doctrine_Connection $conn = null) { if ($this->_updateSearchIndex) { $index = sfSympalSearch::getInstance()->getIndex(); foreach ($index->find('pk:' . $this->getId()) as $hit) { $index->delete($hit->id); } } return parent::delete($conn); }
public function delete(Doctrine_Connection $conn = null) { if ($this->_updateSearchIndex) { $index = sfSympalSearch::getInstance()->getIndex(); foreach ($index->find('pk:' . $this->getId()) as $hit) { $index->delete($hit->id); } } // delete content from accociated content type table Doctrine_Core::getTable($this->getType()->getName())->findOneByContentId($this->getId())->delete(); return parent::delete($conn); }