Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Views integration
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2017 at 15:29 UTC
Updated:
8 Jan 2019 at 17:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
drunken monkeySure, we can into that. Thanks for the suggestion!
Comment #3
mkalkbrennerHere's a first patch. It a proof-of-concept at the moment.
Comment #4
drunken monkeyLooks pretty good already, and seems to work great, thanks a lot!
Why do you say it's still just a proof of concept, what would you want to improve? (Of course, we could add a
getOperations()method to the datasource class (plus a separate interface) to enable non-entity datasources to also provide operations – but that would probably be a bit too much, especially if no-one has yet requested it.)In any case, a few nitpicks about code style and structure, but no real changes.
Might be good to get tests for this, though, of course. Question is whether the
entity_test_mulrev_changedentity type (which we use inViewsTest) defines operations. Otherwise, this would probably be too bothersome to test.Comment #5
mkalkbrennerThanks. We already use it in production ;-)
I'm not sure, when $this->_object will be set. Especially when you enable "Retrieve data from Solr". But I was in a hurry as we required the patch. So I just didn't spent any time on a deeper investigation.
We can use a test module and a hook to add operations to entity_test_mulrev_changed.
Comment #6
drunken monkeyAh, you're right, didn't think about that. The attached revision should make this more reliable.
Good idea! Do you have the time to work on that? You can just use the search_api_test_views module for the hook.
Comment #7
drunken monkeyComment #8
mtodor commentedHere is a proposal for testing.
Following things are added in tests:
Comment #10
drunken monkeyAwesome, thanks a lot for finally taking care of this!
Looks pretty good, too, just minimally improved code style.
Committed.
Thanks again, everyone!