Neos\Neos\Service\VieSchemaBuilder::getAllAncestors PHP Method

getAllAncestors() protected method

Return all ancestors of a node type
protected getAllAncestors ( string $type ) : array
$type string
return array
    protected function getAllAncestors($type)
    {
        if (!isset($this->superTypeConfiguration[$type])) {
            return array();
        }
        $ancestors = $this->superTypeConfiguration[$type];
        foreach ($this->superTypeConfiguration[$type] as $currentSuperType) {
            if (isset($this->types[$currentSuperType])) {
                $currentSuperTypeAncestors = $this->getAllAncestors($currentSuperType);
                $ancestors = array_merge($ancestors, $currentSuperTypeAncestors);
            }
        }
        return $ancestors;
    }