Neos\ContentRepository\Domain\Model\NodeType::isNodeTypeAllowedByConstraints PHP 메소드

isNodeTypeAllowedByConstraints() 보호된 메소드

$constraints is an associative array where the key is the Node Type Name. If the value is "TRUE", the node type is explicitly allowed. If the value is "FALSE", the node type is explicitly denied. If nothing is specified, the fallback "*" is used. If that one is also not specified, we DENY by default. Super types of the given node types are also checked, so if a super type is constrained it will also take affect on the inherited node types. The closest constrained super type match is used.
protected isNodeTypeAllowedByConstraints ( NodeType $nodeType, array $constraints ) : boolean
$nodeType NodeType
$constraints array
리턴 boolean
    protected function isNodeTypeAllowedByConstraints(NodeType $nodeType, array $constraints)
    {
        $directConstraintsResult = $this->isNodeTypeAllowedByDirectConstraints($nodeType, $constraints);
        if ($directConstraintsResult !== null) {
            return $directConstraintsResult;
        }
        $inheritanceConstraintsResult = $this->isNodeTypeAllowedByInheritanceConstraints($nodeType, $constraints);
        if ($inheritanceConstraintsResult !== null) {
            return $inheritanceConstraintsResult;
        }
        if (isset($constraints['*'])) {
            return (bool) $constraints['*'];
        }
        return false;
    }