public function tagLinkUsercontributorDetail($userStoryId, $lang_id, $url) { $userStoryTag = new Model_DbTable_UserStoryTag(); $detailTags = $userStoryTag->getTag($userStoryId, $lang_id); $event = new Model_DbTable_EventDesc(); $destination = new Model_DbTable_DestinationDescription(); $article = new Model_DbTable_ArticleDescription(); $related = '<ul>'; // if (count($detailTags) > 0) { //$related = count($detailTags); foreach ($detailTags as $tags) { if ($tags->object_type == 'event') { $getEvent = $event->getEvenName($tags->object_id, $lang_id); $related .= '<li><a target="_blank" href="' . $url . '/event/detail/' . $tags->object_id . '/' . $getEvent['name'] . '">' . $getEvent['name'] . '</a></li>'; } else { if ($tags->object_type == 'destination') { $getDest = $destination->getDestName($tags->object_id, $lang_id); $related .= '<li><a target="_blank" href="' . $url . '/destination/' . $tags->object_id . '/' . $getDest['name'] . '">' . $getDest['name'] . '</a></li>'; } else { $getArticle = $article->getArticleName($tags->object_id, $lang_id); if (!empty($getArticle['poi_id'])) { $Dest = $destination->getDestName($getArticle['poi_id'], $lang_id); $related .= '<li><a target="_blank" href="' . $url . '/destination/' . $getArticle['poi_id'] . '/' . $Dest['name'] . '/article/' . $tags->object_id . '/' . $getArticle['title'] . '">' . $getArticle['title'] . '</a></li>'; } } } } $related .= '</ul>'; return $related; } else { // $related .= '<li> - </li>'; // $related .= '</ul>'; return false; } }