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: Remove NodeType::getName() and replace usages #4562

Merged
merged 1 commit into from
Sep 28, 2023
Merged
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
9 changes: 0 additions & 9 deletions Neos.ContentRepository.Core/Classes/NodeType/NodeType.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,6 @@ protected function applyPostprocessing(array $fullConfiguration): array
return $fullConfiguration;
}

/**
* Returns the name of this node type
* @deprecated use "name" property directly
*/
public function getName(): string
{
return $this->name->value;
}

/**
* Return boolean true if marked abstract
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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.nodeType.name, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^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.nodeType.name}
nodeType = ${node.nodeTypeName.value}

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 @@ -30,9 +30,9 @@ root {
documentType {
@position = 'end 9998'
condition = Neos.Fusion:CanRender {
type = ${documentNode.nodeType.name}
type = ${documentNode.nodeTypeName.value}
}
type = ${documentNode.nodeType.name}
type = ${documentNode.nodeTypeName.value}
}

default {
Expand All @@ -53,7 +53,7 @@ root {
error {
@position = 'end 10001'
condition = true
type = ${documentNode.nodeType.name}
type = ${documentNode.nodeTypeName.value}
}

@cache {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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.nodeType.name, '/[[:^alnum:]]/', '-')))}
[email protected] = ${Array.push(value, String.toLowerCase(String.pregReplace(node.nodeTypeName.value, '/[[:^alnum:]]/', '-')))}

active.attributes = Neos.Fusion:Attributes {
class = 'active'
Expand Down
Loading