-
Notifications
You must be signed in to change notification settings - Fork 202
Load translated referenced entities before array_filter and abstract logic in a trait #974
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
Load translated referenced entities before array_filter and abstract logic in a trait #974
Conversation
Codecov Report
@@ Coverage Diff @@
## 8.x-4.x #974 +/- ##
==========================================
Coverage ? 54.54%
Complexity ? 621
==========================================
Files ? 114
Lines ? 1562
Branches ? 0
==========================================
Hits ? 852
Misses ? 710
Partials ? 0
Continue to review full report at Codecov.
|
Thanks for this PR Dimitar! Looks good in general but I'd like to split up the function body into smaller reusable pieces and use a more descriptive function name. |
Abstracted also logic inside trait and added some comments to each method. |
# Conflicts: # src/Plugin/GraphQL/DataProducer/Field/EntityReference.php # src/Plugin/GraphQL/DataProducer/Field/EntityReferenceRevisions.php
…ntityReferenceLayoutRevisions
The patch works nicely for me. One thing that is a bit related: |
Currently the logic for resolving translated entity references is loading the translated versions in order to check the access to them. But at the end the default language version is returned. This PR makes sure to pass the proper language version(s) into the
array_filter
function that strips out the ones, where access is not given.