function ForumManager::checkNodeType
Same name in other branches
- 9 core/modules/forum/src/ForumManager.php \Drupal\forum\ForumManager::checkNodeType()
- 8.9.x core/modules/forum/src/ForumManager.php \Drupal\forum\ForumManager::checkNodeType()
- 10 core/modules/forum/src/ForumManager.php \Drupal\forum\ForumManager::checkNodeType()
File
-
core/
modules/ forum/ src/ ForumManager.php, line 476
Class
- ForumManager
- Provides forum manager service.
Namespace
Drupal\forumCode
public function checkNodeType(NodeInterface $node) {
// Fetch information about the forum field.
$field_definitions = $this->entityFieldManager
->getFieldDefinitions('node', $node->bundle());
return !empty($field_definitions['taxonomy_forums']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.