コード例 #1
0
ファイル: Content.php プロジェクト: honestgorillas/humhub
 public function afterDelete()
 {
     // Try delete the underlying object (Post, Question, Task, ...)
     $this->resetPolymorphicRelation();
     if ($this->getPolymorphicRelation() !== null) {
         $this->getPolymorphicRelation()->delete();
     }
     parent::afterDelete();
 }
コード例 #2
0
 /**
  * @inheritdoc
  */
 public function afterDelete()
 {
     if ($this->content !== null) {
         $this->content->delete();
     }
     parent::afterDelete();
 }
コード例 #3
0
 /**
  * @inheritdoc
  */
 public function afterDelete()
 {
     ContentContainer::deleteAll(['pk' => $this->getPrimaryKey(), 'class' => $this->className()]);
     parent::afterDelete();
 }
コード例 #4
0
 /**
  * @inheritdoc
  */
 public function afterDelete()
 {
     $content = Content::findOne(['object_id' => $this->id, 'object_model' => $this->className()]);
     if ($content !== null) {
         $content->delete();
     }
     parent::afterDelete();
 }