public function allowsGrandchildNodeType($childNodeName, NodeType $nodeType)
{
$autoCreatedChildNodes = $this->getAutoCreatedChildNodes();
if (!isset($autoCreatedChildNodes[$childNodeName])) {
throw new \InvalidArgumentException('The method "allowsGrandchildNodeType" can only be used on auto-created childNodes, given $childNodeName "' . $childNodeName . '" is not auto-created.', 1403858395);
}
$constraints = $autoCreatedChildNodes[$childNodeName]->getConfiguration('constraints.nodeTypes') ?: array();
$childNodeConfiguration = [];
foreach ($this->getConfiguration('childNodes') as $name => $configuration) {
$childNodeConfiguration[Utility::renderValidNodeName($name)] = $configuration;
}
$childNodeConstraintConfiguration = ObjectAccess::getPropertyPath($childNodeConfiguration, $childNodeName . '.constraints.nodeTypes') ?: array();
$constraints = Arrays::arrayMergeRecursiveOverrule($constraints, $childNodeConstraintConfiguration);
return $this->isNodeTypeAllowedByConstraints($nodeType, $constraints);
}