Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Plugins
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2017 at 15:52 UTC
Updated:
2 Oct 2017 at 08:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bojanz commentedI just realized supportsIndex() is static, so I can't inject the entity type manager and use it to check if the entity type class of a given entity type ID implements the EntityPublishedInterface. I could use \Drupal::entityTypeManager() but that's a bit unclean. Thoughts?
Comment #3
drunken monkeyWell, what else could you do? Proper DI just isn't possible in all cases.
The attached patch should implement this. Thanks a lot for the suggestion!
We might also just look for a
statusproperty, I guess, instead of all the current logic. And maybe make the affected datasources configurable, to avoid unintended effects. But that would be another issue, I guess.Comment #5
drunken monkeyComment #6
borisson_This looks great!
Comment #7
bojanz commentedIndeed, it does.
Thank you, Thomas.
Comment #9
drunken monkeyGood to hear, thanks for reviewing!
Committed.