Coding standards
Security in ResourceSpace
Developer reference
Database
Mcp browse functions
Mcp report functions

mcp_list_page()

Description

Return a paged result with the count of accessible entries before pagination.

Parameters

ColumnTypeDefaultDescription
$key string > array_slicearray_values$rows
$rows array
$args: array > count$rows
?? $args['limit'] array_columnget_resource_types
'ref';
$types

Location

include/mcp_browse_functions.php lines 134 to 137

Definition

 
function mcp_list_page(string $key, array $rows, array $args): array
{
    return 
mcp_result(['total' => count($rows), $key => array_slice(array_values($rows), $args['offset'] ?? 0, $args['limit'] ?? 25)]);
}

This article was last updated 3rd December 2026 16:35 Europe/London time based on the source file dated 3rd December 2026 16:30 Europe/London time.