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

Refactor to get record loader via class method. #1557

Merged

Conversation

samuli
Copy link
Contributor

@samuli samuli commented Feb 26, 2020

This makes it easier to provide a customized loader by overriding getRecordLoader.

@demiankatz
Copy link
Member

I have no objection to this change since it improves readability a bit (at least until we eventually refactor the controllers as discussed in VUFIND-966).

However, I'd suggest that if you want to override the record loader, it would probably be safer to override the service in your module configuration than to override the getRecordLoader method.

@demiankatz demiankatz merged commit 937dcb8 into vufind-org:master Feb 26, 2020
@samuli
Copy link
Contributor Author

samuli commented Feb 27, 2020

However, I'd suggest that if you want to override the record loader, it would probably be safer to override the service in your module configuration than to override the getRecordLoader method.

Yes, I forgot to mention that we need to init our customized loader (after it has been constructed) differently depending on the controller.

@samuli samuli deleted the hierarchycontroller-get-recordloader branch February 27, 2020 07:04
@demiankatz
Copy link
Member

Makes sense!

EreMaijala pushed a commit to EreMaijala/vufind that referenced this pull request Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants