comment_entity_info
- Versions
- 7
comment_entity_info()
Implements hook_entity_info().
Code
modules/comment/comment.module, line 94
<?php
function comment_entity_info() {
$return = array(
'comment' => array(
'label' => t('Comment'),
'base table' => 'comment',
'fieldable' => TRUE,
'controller class' => 'CommentController',
'object keys' => array(
'id' => 'cid',
'bundle' => 'node_type',
),
'bundle keys' => array(
'bundle' => 'type',
),
'bundles' => array(),
'static cache' => FALSE,
),
);
foreach (node_type_get_names() as $type => $name) {
$return['comment']['bundles']['comment_node_' . $type] = array(
'label' => $name,
);
}
return $return;
}
?>Login or register to post comments 