function entity_menu_links_services_index in Entity menu links 7
Return an array of optionally paged mlids based on a set of criteria.
An example request might look like:
http://domain/endpoint/menu_link?fields=mlid,label¶meters[type]=mytype
This would return an array of objects with only mlid and label defined, where type = 'mytype'.
Parameters
$page: Page number of results to return (in pages of 20).
$fields: The fields you want returned.
$parameters: An array containing fields and values used to build a sql WHERE clause indicating items to retrieve.
$page_size: Integer number of items to be returned.
Return value
An array of menu_link objects.
1 string reference to 'entity_menu_links_services_index'
File
- ./
entity_menu_links.services.inc, line 241 - Contains callbacks for service resource manipulation.
Code
function entity_menu_links_services_index($page, $fields, $parameters, $page_size) {
$info = entity_get_info('menu_link');
$menu_select = db_select($info['base table'], 't')
->condition('module', 'menu')
->orderBy('mlid', 'DESC');
services_resource_build_index_query($menu_select, $page, $fields, $parameters, $page_size, 'menu_link');
$results = services_resource_execute_index_query($menu_select);
return services_resource_build_index_list($results, 'menu_link', 'mlid');
}