コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }