function entity_metadata_form_comment in Entity API 7
Callback to get the form of a comment.
1 string reference to 'entity_metadata_form_comment'
- _entity_info_add_metadata in ./
entity.module - Adds metadata and callbacks for core entities to the entity info.
File
- modules/
callbacks.inc, line 1011 - Provides various callbacks for the whole core module integration.
Code
function entity_metadata_form_comment($comment) {
if (!isset($comment->node_type)) {
$node = node_load($comment->nid);
$comment->node_type = 'comment_node_' . $node->type;
}
return drupal_get_form($comment->node_type . '_form', $comment);
}