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

isNodeTypeAllowedByDirectConstraints() protected method

protected isNodeTypeAllowedByDirectConstraints ( NodeType $nodeType, array $constraints ) : boolean
$nodeType NodeType
$constraints array
return boolean TRUE if the passed $nodeType is allowed by the $constraints
    protected function isNodeTypeAllowedByDirectConstraints(NodeType $nodeType, array $constraints)
    {
        if ($constraints === array()) {
            return true;
        }
        if (array_key_exists($nodeType->getName(), $constraints) && $constraints[$nodeType->getName()] === true) {
            return true;
        }
        if (array_key_exists($nodeType->getName(), $constraints) && $constraints[$nodeType->getName()] === false) {
            return false;
        }
        return null;
    }