-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!!! TASK: Make node label pure neos concept #5020
!!! TASK: Make node label pure neos concept #5020
Conversation
3f51825
to
299a579
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I like!
Just a comment re asset vs node label and IMO we should make NodeLabelRenderer::getNodeLabelGeneratorForNodeType()
private
The tests fail currently because Neos requires the Ui as well which is a bug: #4951 (comment) But when the ui is adjusted everything will work: neos/neos-ui#3772 |
299a579
to
edd67a6
Compare
We discussed that we want rather a flowquery operation for this for simplicity. /**
* Returned the node label as generated by the configured node label generator.
*
* In PHP please use Neos' {@see NodeLabelRenderer} instead.
*
* For Fusion please use the FlowQuery operation:
* ```
* ${q(node).label()}
* ```
*
* @deprecated will be removed before the final 9.0 release
*/
public function getLabel(): string
{
// highly illegal
return (new NodeLabelRenderer())->renderNodeLabel($this);
} |
3c19d54
to
8e0f963
Compare
The CR core will not know anything about node labels anymore. This will be a pure Neos' attached concept.
….Node.renderLabel(node)`
…ext` to `Neos.Neos` ... and remove dead configuration from early Neos 9 experiments
8e0f963
to
b687896
Compare
Solves partially #5019
Upgrade instructions
To get the label for a
Node
in PHP, one must replaceNode::getLabel()
with a call toNeos\Neos\Domain\NodeLabel\NodeLabelGeneratorInterface::getLabel
:In Fusion accessing the label via
${node.label}
will currently no longer work but one can leverage the flowquery${q(node).label()}
to get the label.Additionally
NodeType::getNodeLabelGenerator
has been removed. Please inject theNodeLabelGeneratorInterface
instead.Review instructions
Followup
node.label
viewhelper for fluid (see also #5023)Rector migrations will be provided as part of neos/rector#57
The Label concept was removed from the core as it requires by its current implementation that the
NodeType
is available in the Node. Though there are ways to work around this by adding a label to the nodes constructor via some factory, seeing that the label is not used once in the core made us realise that this is just an arbitrary convenience thing attached to the core. To better have Neos' decide what it wants and how implementation / extensibility and co should look like we remove this concern from the core to also ease standalone use-cases.Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions