I have the use case to do some extended property filtering on last updated (changed) timestamp. The front end iOS app doesn't want to pull down any more data than necessary so they pass a timestamp and ask for anything that has changed on the entity since it last asked.
With the current code base, I got this working by extending RestWSFormatJSON->splitParameters() & RestWSEntityResourceController->query() to override restws_meta_controls() and filter on changedAfter={date}. It works pretty sweet. However, the RestWSFormatJSON is completely unnecessary except for me to insert my additional meta control data. It would save (some) coding if there was an drupal_alter() option inside restws_meta_controls().
Patch forthcoming.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | restws-hook_restws_meta_controls_alter-2114309-2.patch | 1.38 KB | heddn |
| #1 | restws-hook_restws_meta_controls_alter-2114309-1.patch | 867 bytes | heddn |
Comments
Comment #1
heddnHere's a patch
Comment #2
heddnadding api doc for the hook_alter
Comment #3
btopro commentedlooks like a duplicate of #2053147: Allow for custom meta controllers in restws_meta_controls under a different name w/ almost identical patch. I agree w/ the functionality though as I add this patch all the time :)
Comment #4
heddn