Neos\ContentRepository\Domain\Service\NodeTypeManager::evaluateSuperTypeConfiguration PHP Method

evaluateSuperTypeConfiguration() protected method

Evaluates a single superType configuration and returns the NodeType if enabled.
protected evaluateSuperTypeConfiguration ( string $superTypeName, boolean $enabled, array &$completeNodeTypeConfiguration ) : NodeType
$superTypeName string
$enabled boolean
$completeNodeTypeConfiguration array
return Neos\ContentRepository\Domain\Model\NodeType
    protected function evaluateSuperTypeConfiguration($superTypeName, $enabled, &$completeNodeTypeConfiguration)
    {
        // Skip unset node types
        if ($enabled === false || $enabled === null) {
            return null;
        }
        // Make this setting backwards compatible with old array schema (deprecated since 2.0)
        if (!is_bool($enabled)) {
            $superTypeName = $enabled;
        }
        // when removing super types by setting them to null, only string keys can be overridden
        if ($superTypeName === null) {
            throw new NodeConfigurationException('Node type sets super type with a non-string key to NULL.', 1444944152);
        }
        $superType = $this->loadNodeType($superTypeName, $completeNodeTypeConfiguration);
        if ($superType->isFinal() === true) {
            throw new NodeTypeIsFinalException($superType->getName(), 1444944148);
        }
        return $superType;
    }