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: Migrate fusion context.currentRenderingMode statements #28

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

mficzel
Copy link
Member

@mficzel mficzel commented Oct 4, 2023

Statements accessing using(node|documentNode|site).context.currentRenderingMode.(edit|preview|name|title|fusionPath|options) are migrated. Other uses of context.currentRenderingMode are marked with a comment.

Resolves: #23

@mficzel mficzel force-pushed the 90/migrateContextCurrentRenderingMode branch 2 times, most recently from 963f7a0 to 54fcabc Compare October 4, 2023 15:52
@mficzel mficzel marked this pull request as ready for review October 4, 2023 15:54
Copy link
Member

@ahaeslich ahaeslich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new rule should also be added to config/set/contentrepository-90.php. If think this commented lines could fit:

// ContentContext::getCurrentRenderingMode
// TODO: PHP
// TODO: Fusion

Copy link
Contributor

@dlubitz dlubitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care.

Look great, but Anke is right.

Statements accessing `context.currentRenderingMode.edit|preview|name|title|fusionPath|options` on `node|site|documentNode` are migrated. Other uses of `context.currentRenderingMode` are marked with a comment.

Resolves: #23
@mficzel mficzel force-pushed the 90/migrateContextCurrentRenderingMode branch from 54fcabc to e397f70 Compare October 5, 2023 07:04
@mficzel
Copy link
Member Author

mficzel commented Oct 5, 2023

Offcourse @ahaeslich is right. Added the line and also adjusted the comments for the other renderingMode rectors.

Any suggestions how to adjust this php wise. How can we migrate ContentContext::getCurrentRenderingMode >> RenderingModeService::findByCurrentUser

@ahaeslich
Copy link
Member

ahaeslich commented Oct 6, 2023

@mficzel do you want to address the php transformation in this PR too?

How can we migrate ContentContext::getCurrentRenderingMode >> RenderingModeService::findByCurrentUser

Just to be clear: Are you asking how to write such a PHP Transformation? Like this one: #17?

@mficzel mficzel merged commit e752234 into main Oct 6, 2023
2 checks passed
@mficzel
Copy link
Member Author

mficzel commented Oct 6, 2023

@ahaeslich yes wanted to know wether we could migrate php code aswell

@mhsdesign mhsdesign deleted the 90/migrateContextCurrentRenderingMode branch October 9, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TASK: 9.0 migrate node.context.currentRenderingMode.edit
3 participants