private function validateChildClass(NodeInterface $parentNode, ClassMetadata $class)
    {
        $parentClass = $this->documentClassMapper->getClassName($this->dm, $parentNode);

        if (null === $parentClass) {
            return;
        }

        $metadata = $this->dm->getClassMetadata($parentClass);
        $metadata->assertValidChildClass($class);
    }
private function validateChildClass(NodeInterface $parentNode, ClassMetadata $class)
    {
        $parentClass = $this->documentClassMapper->getClassName($this->dm, $parentNode);

        if (null === $parentClass) {
            return;
        }

        $metadata = $this->dm->getClassMetadata($parentClass);
        $metadata->assertValidChildClass($class);
    }
private function validateChildClass ( NodeInterface $ parentNode , ClassMetadata $ class ) { $ parentClass = $ this -> documentClassMapper -> getClassName ( $ this -> dm , $ parentNode ) ; if ( null === $ parentClass ) { return ; } $ metadata = $ this -> dm -> getClassMetadata ( $ parentClass ) ; $ metadata -> assertValidChildClass ( $ class ) ; }
If the parent node has child restrictions, ensure that the given
class name is within them.

@param NodeInterface $parentNode
@param string        $classFqn
If the parent node has child restrictions ensure that the given class name is within them .