Neos\ContentRepository\Migration\Filters\NodeType::matches PHP Method

matches() public method

Returns TRUE if the given node is of the node type this filter expects.
public matches ( NodeData $node ) : boolean
$node Neos\ContentRepository\Domain\Model\NodeData
return boolean
    public function matches(NodeData $node)
    {
        if ($this->withSubTypes === true) {
            $nodeIsMatchingNodeType = $node->getNodeType()->isOfType($this->nodeTypeName);
        } else {
            // This is needed to get the raw string NodeType to prevent errors for NodeTypes that no longer exist.
            $nodeType = ObjectAccess::getProperty($node, 'nodeType', true);
            $nodeIsMatchingNodeType = $nodeType === $this->nodeTypeName;
        }
        if ($this->exclude === true) {
            return !$nodeIsMatchingNodeType;
        }
        return $nodeIsMatchingNodeType;
    }