Exemplo n.º 1
0
 public function delete()
 {
     $mds = ModelDescription::get_by_modelId($this->id);
     foreach ($mds as $md) {
         $md->delete();
     }
     if ($this->modelType == 'V') {
         $pm = ParticipleModel::loadByVerbModel($this->number);
         $pm->delete();
     }
     parent::delete();
 }
Exemplo n.º 2
0
 public function delete()
 {
     WikiKeyword::deleteByWikiArticleId($this->id);
     parent::delete();
 }
Exemplo n.º 3
0
 public function delete($connection = null)
 {
     if (!isset($connection)) {
         $connection = QubitTransactionFilter::getConnection(QubitObject::DATABASE_NAME);
     }
     $statement = $connection->prepare('
   DELETE FROM ' . QubitSlug::TABLE_NAME . '
   WHERE ' . QubitSlug::OBJECT_ID . ' = ?');
     $statement->execute(array($this->id));
     // Delete other names
     if (0 < count($this->otherNames)) {
         foreach ($this->otherNames as $otherName) {
             $otherName->delete();
         }
     }
     parent::delete($connection);
 }
Exemplo n.º 4
0
 function delete()
 {
     // TODO: Delete thumbnail and its directory (if it becomes empty)
     VisualTag::delete_all_by_imageId($this->id);
     return parent::delete();
 }
Exemplo n.º 5
0
 public function delete()
 {
     db_execute("update Inflection set rank = rank - 1 where modelType = '{$this->modelType}' and rank > {$this->rank}");
     parent::delete();
 }
Exemplo n.º 6
0
 public function delete()
 {
     if ($this->id) {
         if ($this->hasModelType('VT')) {
             $this->deleteParticiple();
         }
         if ($this->hasModelType('VT') || $this->hasModelType('V')) {
             $this->deleteLongInfinitive();
         }
         LexemDefinitionMap::deleteByLexemId($this->id);
         Meaning::delete_all_by_lexemId($this->id);
         Relation::delete_all_by_lexemId($this->id);
         LexemModel::delete_all_by_lexemId($this->id);
     }
     // Clear the variantOfId field for lexems having $this as main.
     $lexemsToClear = Lexem::get_all_by_variantOfId($this->id);
     foreach ($lexemsToClear as $l) {
         $l->variantOfId = null;
         $l->save();
     }
     parent::delete();
 }
Exemplo n.º 7
0
 function delete()
 {
     InflectedForm::delete_all_by_lexemModelId($this->id);
     LexemSource::delete_all_by_lexemModelId($this->id);
     // delete_all_by_lexemModelId doesn't work for FullTextIndex because it doesn't have an ID column
     Model::factory('FullTextIndex')->where('lexemModelId', $this->id)->delete_many();
     parent::delete();
 }
Exemplo n.º 8
0
 public function delete()
 {
     MeaningSource::deleteByMeaningId($this->id);
     MeaningTagMap::deleteByMeaningId($this->id);
     Relation::delete_all_by_meaningId($this->id);
     parent::delete();
 }
Exemplo n.º 9
0
 public function delete()
 {
     if ($this->id) {
         if ($this->modelType == 'VT') {
             $this->deleteParticiple($this->modelNumber);
         }
         if ($this->modelType == 'VT' || $this->modelType == 'V') {
             $this->deleteLongInfinitive();
         }
         LexemDefinitionMap::deleteByLexemId($this->id);
         InflectedForm::deleteByLexemId($this->id);
     }
     parent::delete();
 }