public function isNodeTypeAllowedAsChildNode(NodeType $nodeType) { if ($this->isAutoCreated()) { return $this->getParent()->getNodeType()->allowsGrandchildNodeType($this->getName(), $nodeType); } else { return $this->getNodeType()->allowsChildNodeType($nodeType); } }