public function HierarchyManager::hierarchyCanBeParent in Entity Reference Hierarchy 8
Overrides HierarchyManagerInterface::hierarchyCanBeParent
See also
hierarchyGetAllowedChildTypes
File
- src/
HierarchyManager.php, line 208 - Contains \Drupal\entity_hierarchy\HierarchyManager.
Class
- HierarchyManager
- Defines a hierarchy manager.
Namespace
Drupal\entity_hierarchyCode
public function hierarchyCanBeParent($node) {
$type = is_object($node) ? $node
->getType() : $node;
return count($this
->hierarchyGetAllowedChildTypes($type));
}