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.

Comments

heddn’s picture

Status: Active » Needs review
StatusFileSize
new867 bytes

Here's a patch

heddn’s picture

adding api doc for the hook_alter

btopro’s picture

looks 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 :)

heddn’s picture

Status: Needs review » Closed (duplicate)