public function getSubtypes($nodeTypeName)
{
// OPTIMIZE: any way to avoid loading all nodes at this point?
$this->fetchNodeTypes();
$ret = array();
if (isset($this->nodeTree[$nodeTypeName])) {
foreach ($this->nodeTree[$nodeTypeName] as $name => $subnode) {
$ret = array_merge($ret, array($name => $subnode), $this->getSubtypes($name));
}
}
return $ret;
}