LLMS_REST_API_Keys_Controller::get_pagination_data_from_query( LLMS_REST_API_Keys_Query $query, array $prepared, WP_REST_Request $request )

Retrieve pagination information from an objects query.


Parameters Parameters

$query

(LLMS_REST_API_Keys_Query) (Required) Objects query result returned by LLMS_REST_API_Keys_Controller::get_objects_query().

$prepared

(array) (Required) Array of collection arguments.

$request

(WP_REST_Request) (Required) Request object.


Top ↑

Return Return

(array) Array of pagination information.

  • 'current_page'
    (int) Current page number.
  • 'total_results'
    (int) Total number of results.
  • 'total_pages'
    (int) Total number of results pages.


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-api-keys-controller.php

	 * @return array {
	 *     Array of pagination information.
	 *
	 *     @type int $current_page  Current page number.
	 *     @type int $total_results Total number of results.
	 *     @type int $total_pages   Total number of results pages.
	 * }
	 */
	protected function get_pagination_data_from_query( $query, $prepared, $request ) {

Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.7
1.0.0-beta-24 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.