Neos\ContentRepository\Domain\Model\NodeType::addInheritedSuperTypes PHP Method

addInheritedSuperTypes() protected method

Recursively add super types
protected addInheritedSuperTypes ( array &$superTypes, NodeType $superType ) : void
$superTypes array
$superType NodeType
return void
    protected function addInheritedSuperTypes(array &$superTypes, NodeType $superType)
    {
        foreach ($superType->getDeclaredSuperTypes() as $inheritedSuperTypeName => $inheritedSuperType) {
            $this->addInheritedSuperTypes($superTypes, $inheritedSuperType);
            $superTypes[$inheritedSuperTypeName] = $inheritedSuperType;
        }
        // the method getSuperTypes() is a magic getter
        $superTypesInSuperType = $superType->getSuperTypes() ?: [];
        foreach ($superTypesInSuperType as $inheritedSuperTypeName => $inheritedSuperType) {
            if (!$inheritedSuperType) {
                unset($superTypes[$inheritedSuperTypeName]);
            }
        }
    }