Skip to content
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: Replace node.nodeTypeName.value with q(node).nodeTypeName() #5171

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ExpressionBasedNodeLabelGenerator implements NodeLabelGeneratorInterface
* @var string
*/
protected $expression = <<<'EEL'
${(Neos.Node.getNodeType(node).label || node.nodeTypeName.value) + (node.nodeName ? ' (' + node.nodeName.value + ')' : '')}
${(Neos.Node.getNodeType(node).label || q(node).nodeTypeName()) + (node.nodeName ? ' (' + node.nodeName.value + ')' : '')}
EEL;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ prototype(Neos.Neos:Content) < prototype(Neos.Fusion:Template) {
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

# The following line must not be removed as it adds required meta data to all content elements in backend
@process.contentElementWrapping {
Expand Down
2 changes: 1 addition & 1 deletion Neos.Neos/Resources/Private/Fusion/RawContent/Node.fusion
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prototype(Neos.Neos:RawContent.Node) < prototype(Neos.Neos:ContentComponent) {

nodeType = ${node.nodeTypeName.value}
nodeType = ${q(node).nodeTypeName()}

renderer = Neos.Fusion:Case {
custom {
Expand Down
6 changes: 3 additions & 3 deletions Neos.Neos/Resources/Private/Fusion/RootCase.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ root {
documentType {
@position = 'end 9998'
condition = Neos.Fusion:CanRender {
type = ${documentNode.nodeTypeName.value}
type = ${q(documentNode).nodeTypeName()}
}
type = ${documentNode.nodeTypeName.value}
type = ${q(documentNode).nodeTypeName()}
}

default {
Expand All @@ -51,7 +51,7 @@ root {
error {
@position = 'end 10001'
condition = true
type = ${documentNode.nodeTypeName.value}
type = ${q(documentNode).nodeTypeName()}
}

@cache {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Feature: Tests for the "Neos.Neos:ContentCollection" Fusion prototype
include: resource://Neos.Neos/Private/Fusion/Root.fusion

prototype(Neos.Neos:Test.ContentType) < prototype(Neos.Fusion:Value) {
value = ${node.nodeAggregateId.value + ' (' + node.nodeTypeName.value + ') '}
value = ${q(node).id() + ' (' + q(node).nodeTypeName() + ') '}
}

test = Neos.Neos:ContentCollection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prototype(Neos.NodeTypes.AssetList:AssetList) < prototype(Neos.Neos:ContentCompo
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

@if.render = ${this.assets || renderingMode.isEdit}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ prototype(Neos.NodeTypes.ColumnLayouts:MultiColumn) < prototype(Neos.Neos:Conten
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

columns = Neos.Fusion:Loop {
@context.columnLayout = ${q(node).property('layout')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ prototype(Neos.NodeTypes.ContentReferences:ContentReferences) < prototype(Neos.N
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

renderer = afx`
<div {...props.attributes}>
Expand Down
2 changes: 1 addition & 1 deletion Neos.NodeTypes.Form/Resources/Private/Fusion/Root.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ prototype(Neos.NodeTypes.Form:Form) < prototype(Neos.Neos:ContentComponent) {
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

renderer = afx`
<div {...props.attributes}>
Expand Down
2 changes: 1 addition & 1 deletion Neos.NodeTypes.Html/Resources/Private/Fusion/Html.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ prototype(Neos.NodeTypes.Html:Html) < prototype(Neos.Neos:ContentComponent) {
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

renderer = afx`
<div {...props.attributes}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ prototype(Neos.NodeTypes.Navigation:Navigation) < prototype(Neos.Neos:Menu) {
maximumLevels = ${q(node).property('maximumLevels')}
[email protected] = ${String.toInteger(value)}

[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

active.attributes = Neos.Fusion:DataStructure {
class = 'active'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ prototype(Neos.NodeTypes:Headline) < prototype(Neos.Neos:ContentComponent) {
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

renderer = afx`
<div {...props.attributes}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ prototype(Neos.NodeTypes:Image) < prototype(Neos.Neos:ContentComponent) {
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

renderer = afx`
<div {...props.attributes}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ prototype(Neos.NodeTypes:Text) < prototype(Neos.Neos:ContentComponent) {
# [email protected] >
# }
# in your site's Fusion if you don't need that behavior.
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(q(node).nodeTypeName(), '/[[:^alnum:]]/', '-')))}

renderer = afx`
<div {...props.attributes}>
Expand Down
Loading