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

ENH Add generic types #220

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

GuySartorelli
Copy link
Member

Requires silverstripe/silverstripe-framework#11108 and the corresponding PR from silverstripe/admin for these generics to take effect.

Issue

@@ -17,6 +18,8 @@
/**
* CMSPageEditController extension to receive the additional action button from
* SiteTreeContentReview::updateCMSActions()
*
* @extends LeftAndMainExtension<CMSMain>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @extends LeftAndMainExtension<CMSMain>
* @extends LeftAndMainExtension<CMSPageEditController|ContentReviewCMSExtension>

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed in person, both CMSPageEditController and CMSPageSettingsController which this is applied to are subclasses of CMSMain, so it makes sense to use that superclass as the typehint here.

@emteknetnz emteknetnz merged commit f04e9fa into silverstripe:5 Jan 18, 2024
12 checks passed
@emteknetnz emteknetnz deleted the pulls/5/add-generics branch January 18, 2024 21:01
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.

2 participants