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 #67

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

GuySartorelli
Copy link
Member

@@ -11,6 +11,8 @@
/**
* AuditHookManyManyList is meant to override ManyManyList. When a Member is
* removed from a Group, it logs the event.
*
* @extends ManyManyList<Member>
Copy link
Member

Choose a reason for hiding this comment

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

This means it extends a ManyManyList that contains a list of Members correct?

However silverstripe/auditor will use injector swap out ALL ManyManyList with AuditHookManyManyList ... so <Member> could be anything

Is the assumption here that if you manually instantiate an AuditHookManyManyList it would only be for Members?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahh. For some reason in my brain this was only replacing ManyManyList when it's explicitly a list of members, but as you pointed out that's not necessarily the case. I'll update to template T of dataobject.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@emteknetnz emteknetnz merged commit 8c847f5 into silverstripe:3 Jan 18, 2024
12 checks passed
@emteknetnz emteknetnz deleted the pulls/3/add-generics branch January 18, 2024 20:57
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