LLMS_REST_Controller
LLMS_REST_Controller class
Description Description
Source Source
File: libraries/lifterlms-rest/includes/abstracts/class-llms-rest-controller.php
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.7 | Break get_items() method into prepare_collection_query_args() , prepare_args_for_total_count_query() , prepare_collection_items_for_response() and add_header_pagination() methods so to improve abstraction. prepare_objects_query() renamed to prepare_collection_query_args() . |
1.0.0-beta.3 | Fix an issue displaying a last page for lists with 0 possible results & handle error conditions early in responses. |
1.0.0-beta.14 | Update prepare_links() to accept a second parameter, WP_REST_Request . |
1.0.0-beta.12 | Added logic to perform a collection search. Added object_inserted() and object_completely_inserted() methods called after an object is respectively inserted in the DB and all its additional fields have been updated as well (completely inserted). |
1.0.0-beta.1 | Introduced. |
Methods Methods
- add_header_pagination — Add pagination info and links to the response header.
- create_item — Create an item.
- delete_item — Delete the item.
- get_collection_params — Retrieves the query params for the objects collection.
- get_delete_item_args — Retrieve arguments for deleting a resource.
- get_get_item_params — Retrieves the query params for retrieving a single resource.
- get_item — Get a single item.
- get_items — Retrieves all items
- map_params_to_query_args — Map schema to query arguments to retrieve a collection of objects.
- map_schema_to_database — Map request keys to database keys for insertion.
- object_completely_inserted — Called right after a resource is completely inserted (created/updated).
- object_inserted — Called right after a resource is inserted (created/updated).
- prepare_args_for_total_count_query — Prepare query args for total count query.
- prepare_collection_items_for_response — Prepare collection items for response.
- prepare_collection_query_args — Format query arguments to retrieve a collection of objects.
- prepare_collection_query_search_args — Format search query arguments to retrieve a collection of objects.
- prepare_item_for_database — Prepare request arguments for a database insert/update.
- prepare_item_for_response — Prepares a single object for response.
- prepare_links — Prepare links for the request.
- register_routes — Register routes.
- update_item — Update item.