You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -400,6 +400,7 @@ class MySiteTreeEndpoint extends RestApiEndpoint
400
400
```
401
401
402
402
Notes:
403
+
403
404
- If your extension hook updates the DataObject or another DataObject then it is likely you should use a different extension hook such as `onAfterWrite()` on the Dataobject itself rather than on the endpoint. This is because it usually shouldn't matter whether the object was created/updated/deleted via the API or a different way. These hooks are intended to facilitate the implementation of API specific code such as logging operations done via the API.
404
405
- For the `onView*()` hooks if you are adding extra data to the JSON for the response, remember to call `canView()` for any DataObjects being added as required.
405
406
- For the `onEdit*Write()` hooks you may find it useful to get the fields changed in the operations with `$obj->getChangedFields()`.
0 commit comments