Hey everybody,
(this post probably only makes sense for people involved in the project)
I’ve started to work at https://github.com/skurfuerst/contentrepository-development-collection (which we should move to the Neos namespace now I’d say). Status is as follows:
- classes compile for the first time.
- NodeData -> Events works
- Readme added
- code is based on Neos.ContentRepository.DimensionSpace now
- Routing based on the event-sourced code works (with feature toggle to switch old/new behavior)
- Frontend\NodeController based on the event sourced code works (with feature toggle to switch old/new behavior)
Now, the most difficult part is to ensure Fusion etc renders properly. This is difficult because 1) some Fusion prototypes should be replaced altogether (easier) and 2) the current codebase relies heavily on the legacy NodeInterface (harder).
Mapping from old NodeInterface to new TraversableNodeInterface
// old NodeInterface -> new NodeInterface
-> getSubgraph(): ContentSubgraphInterface;
-> getContentStreamIdentifier(): ContentStreamIdentifier;
-> getNodeIdentifier(): NodeIdentifier;
getIdentifier(); (string) -> getNodeAggregateIdentifier(): NodeAggregateIdentifier;
-> getNodeTypeName(): NodeTypeName;
getNodeType() -> getNodeType(): NodeType;
getName(); (string) -> getNodeName(): NodeName;
-> getDimensionSpacePoint(): DimensionSpacePoint;
!! getProperties(); (array) -> getProperties(): PropertyCollection;
getProperty($propertyName); (mixed) -> getProperty($propertyName);
hasProperty($propertyName); (bool) -> hasProperty($propertyName): bool;
isHidden(); (boolean) -> isHidden() : boolean;
getLabel(); (string) -> getLabel(): string;
// old NodeInterface -> new TraversableNodeInterface
-> getContextParameters(): Domain\Context\Parameters\ContextParameters;
getParent(); (NodeInterface) -> getParent(): ?TraversableNodeInterface; -> findParentNode()
getPath(); (string) -> getNodePath(): NodePath; -> findNodePath()
!! only one level deep getNode($path); (NodeIface) -> findNamedChildNode(NodeName $nodeName): ?TraversableNodeInterface;
getChildNodes($nodeTypeFilter = null, $limit = null, $offset = null); array<\Neos\ContentRepository\Domain\Model\NodeInterface>
-> getChildNodes(NodeTypeConstraints $nodeTypeConstraints = null, $limit = null, $offset = null); -> findChildNodes()
getContextPath(); (string) -> getNodeAddress (NodeAddress)
we’d have to check the following API methods from old NodeInterface whether we need to support them at all:
(we check this off once we checked whether we need to support it; with a short description afterwards)
- [x] getPropertyNames(); (array)
-> not used at all outside of "Node"
- [x] getWorkspace(); (Workspace)
-> used in ContentElementWrappingService; that is something we might need to override.
- [x] getPrimaryChildNode(); (NodeInterface)
-> unused at all
- [x] hasChildNodes($nodeTypeFilter = null); bool
-> only used in HtmlAugumenter, NodeTreeBuilder and NodeView
- [x] isNodeTypeAllowedAsChildNode(NodeType $nodeType); bool
-> only used in Create/Copy/Move Commands -> will be moved to Command Handler.
- [x] getDimensions(); array
-> only in Node::createRecursiveCopy and NodeContentDimensionsInformation.html
- [ ] !!!! isAutoCreated(); boolean
-> that is a more difficult one; unsure how to solve this one.
- [x] getOtherNodeVariants(); array<NodeInterface>
-> unused!
- [x] getContentObject(); ...
-> unused!
- [ ] getHiddenBeforeDateTime(); (DateTime)
- [ ] getHiddenAfterDateTime(); (DateTime)
- [ ] isHiddenInIndex(); (boolean)
- [x] getNodeData(); (NodeData)
-> not used during rendering; except "ContentChangeDiff.html"
- [ ] isRemoved(); bool
- [ ] getAccessRoles(); (array)
- [ ] hasAccessRestrictions(); bool
- [ ] isVisible(); bool
- [ ] isAccessible(); bool
- [x] getDepth(); (int)
-> might be used in Menu fusion; but we replace Menu anyways completely.
- [x] getIndex(); (int)
-> not used
- [x] getParentPath(); (string)
-> not really used I'd say
- !!! [ ] getContext(); (Context)
-> that's a difficult one we need to check case by case.
We do not support the write side of NodeInterface (just included for clarity)
// NodeInterface WRITE
setName($newName);
setProperty($propertyName, $value);
removeProperty($propertyName);
setContentObject($contentObject);
unsetContentObject();
setNodeType(NodeType $nodeType);
setHidden($hidden);
setHiddenBeforeDateTime(\DateTime $dateTime = null);
setHiddenInIndex($hidden);
setWorkspace(Workspace $workspace);
createNode($name, NodeType $nodeType = null, $identifier = null);
createSingleNode($name, NodeType $nodeType = null, $identifier = null);
createNodeFromTemplate(NodeTemplate $nodeTemplate, $nodeName = null);
moveBefore(NodeInterface $referenceNode);
moveAfter(NodeInterface $referenceNode);
moveInto(NodeInterface $referenceNode);
copyBefore(NodeInterface $referenceNode, $nodeName);
copyAfter(NodeInterface $referenceNode, $nodeName);
copyInto(NodeInterface $referenceNode, $nodeName);
createVariantForContext($context); NodeInterface
setHiddenAfterDateTime(\DateTime $dateTime = null);
setIndex($index);
setRemoved($removed);
setAccessRoles(array $accessRoles);
remove();