neos / rector

Neos Rector Recipes for code migrations
6 stars 4 forks source link

Remove NodeTypeManager from NodeType #35

Closed dlubitz closed 10 months ago

dlubitz commented 10 months ago

See: https://github.com/neos/neos-development-collection/pull/4520

the NodeTypeManager can provide replacements:

- $nodeType->getAutoCreatedChildNodes();
+ $nodeTypeManager->getTetheredNodesConfigurationForNodeType($nodeType);

- $nodeType->hasAutoCreatedChildNode($nodeName);
+ $nodeType->hasTetheredNode($nodeName);

- $parentsNodeType->getTypeOfAutoCreatedChildNode($nodeName);
+ $nodeTypeManager->getTypeOfTetheredNode($parentsNodeType, $nodeName);

- $grandParentsNodeType->allowsGrandchildNodeType($parentNodeName, $nodeType);
+ $nodeTypeManager->isNodeTypeAllowedAsChildToTetheredNode($grandParentsNodeType, NodeName::fromString($parentNodeName), $nodeType);