Issue #1018050 by sun: Provide node type/bundle in comment_entity_info().

8.0.x
Nathaniel 2011-09-28 15:39:49 +09:00
parent f5085c003f
commit 70619a1113
1 changed files with 3 additions and 0 deletions

View File

@ -118,6 +118,9 @@ function comment_entity_info() {
foreach (node_type_get_names() as $type => $name) { foreach (node_type_get_names() as $type => $name) {
$return['comment']['bundles']['comment_node_' . $type] = array( $return['comment']['bundles']['comment_node_' . $type] = array(
'label' => t('@node_type comment', array('@node_type' => $name)), 'label' => t('@node_type comment', array('@node_type' => $name)),
// Provide the node type/bundle name for other modules, so it does not
// have to be extracted manually from the bundle name.
'node bundle' => $type,
'admin' => array( 'admin' => array(
// Place the Field UI paths for comments one level below the // Place the Field UI paths for comments one level below the
// corresponding paths for nodes, so that they appear in the same set // corresponding paths for nodes, so that they appear in the same set