Permalink
Browse files

add getLink function (used in the feed)

  • Loading branch information...
nibsirahsieu committed Apr 9, 2011
1 parent 1917084 commit 0a11c81ab73d85af256b64be21fa466a1483fa6d
Showing with 12 additions and 1 deletion.
  1. +12 −1 lib/model/plugin/PluginsfNestedComment.php
@@ -109,4 +109,15 @@ public function getCommentableTitle()
{
return $this->getCommentableObject()->__toString();
}
-}
+
+ public function getLink()
+ {
+ $callable = sfNestedCommentConfig::getUrlCommentableCallable();
+ if ($callable)
+ {
+ $commentableUrl = call_user_func($callable, $this->getCommentableObject());
+ return $commentableUrl .= '#comment-'.$this->getId();
+ }
+ return '';
+ }
+}

0 comments on commit 0a11c81

Please sign in to comment.