/** * Generates the hyperlinks for post tags. * This is mainly used by the view that displays a post. * @param Post the post instance * @return string the hyperlinks for the post tags */ public function getTagLinks($post) { $links = array(); $tags = POST::getTagArray($post); foreach ($tags as $tag) { $links[] = CHtml::link($tag, array('/', 'tag' => $tag)); } return implode(', ', $links); }