Exemple #1
0
 /**
  * remove tag relation and subg tag relation
  *
  * @param $tagId
  * @param $typeId
  * @param $parentId
  * @return int
  */
 public function removeTagRelation($tagId, $typeId, $parentId)
 {
     $tagModel = new tagModel();
     $subTags = $tagModel->getSubTags($tagId, $typeId);
     if ($subTags) {
         foreach ($subTags as $subTag) {
             $this->removeTagRelation($subTag->child_id, $typeId, $subTag->parent_id);
         }
     }
     return $tagModel->removeTagRelation($tagId, $typeId, $parentId);
 }