summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 06:26:49 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-13 06:26:49 +0000
commit83c97345e8eada544d7da4586e2c77db469ed5b1 (patch)
treea1f3be8ca91873c1da221d108470bbac8dc1bb0d /modules/comment/comment.module
parentc78283e81bb60fd6c4574ad65d2b854dca524a98 (diff)
downloadbrdo-83c97345e8eada544d7da4586e2c77db469ed5b1.tar.gz
brdo-83c97345e8eada544d7da4586e2c77db469ed5b1.tar.bz2
#525622 by Frando, yched, et al: Add entity hook callbacks so that 'as link' formatters have a generic way to build the url of an 'entity'.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 678c92bf2..0b3fc2d8c 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -97,6 +97,7 @@ function comment_entity_info() {
'comment' => array(
'label' => t('Comment'),
'base table' => 'comment',
+ 'path callback' => 'comment_path',
'fieldable' => TRUE,
'controller class' => 'CommentController',
'object keys' => array(
@@ -126,6 +127,13 @@ function comment_entity_info() {
}
/**
+ * Entity path callback.
+ */
+function comment_path($comment) {
+ return 'comment/' . $comment->cid;
+}
+
+/**
* Implements hook_theme().
*/
function comment_theme() {