public function ForumTopicHandler::isLearningPathContent in Opigno forum 3.x
Same name and namespace in other branches
- 8 src/ForumTopicHandler.php \Drupal\opigno_forum\ForumTopicHandler::isLearningPathContent()
Checks whether a node type is configured as learning path content.
Parameters
string $node_type_id: The node type ID.
Return value
bool TRUE if the node is configured as learning path content, FALSE otherwise.
1 call to ForumTopicHandler::isLearningPathContent()
- ForumTopicHandler::onNodeInsert in src/
ForumTopicHandler.php - Performs node creation tasks.
File
- src/
ForumTopicHandler.php, line 98
Class
- ForumTopicHandler
- Handles the relationship between forum topics and groups.
Namespace
Drupal\opigno_forumCode
public function isLearningPathContent($node_type_id) {
try {
/** @var \Drupal\group\Entity\GroupTypeInterface $group_type */
$group_type = $this->entityTypeManager
->getStorage('group_type')
->load('learning_path');
$group_type
->getContentPlugin('group_node:' . $node_type_id);
return TRUE;
} catch (PluginNotFoundException $e) {
return FALSE;
}
}