function forum_entity_bundle_field_info_alter
Same name in other branches
- 9 core/modules/forum/forum.module \forum_entity_bundle_field_info_alter()
- 10 core/modules/forum/forum.module \forum_entity_bundle_field_info_alter()
- 11.x core/modules/forum/forum.module \forum_entity_bundle_field_info_alter()
Implements hook_entity_bundle_field_info_alter().
File
-
core/
modules/ forum/ forum.module, line 140
Code
function forum_entity_bundle_field_info_alter(&$fields, EntityTypeInterface $entity_type, $bundle) {
if ($entity_type->id() == 'node' && !empty($fields['taxonomy_forums'])) {
$fields['taxonomy_forums']->addConstraint('ForumLeaf', []);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.