You are here

function fieldable_panels_panes_services_index in Fieldable Panels Panes (FPP) 7

Return an array of optionally paged bids based on a set of criteria.

An example request might look like:

http://domain/endpoint/fieldable_panels_panes?fields=fpid,label&paramete...

This would return an array of objects with only pfid and label defined, where bundle = 'text'.

Parameters

int $page: Page number of results to return (in pages of 20).

string $fields: The fields you want returned as a string separated by commas.

array $parameters: Fields and values used to build a sql WHERE clause indicating items to retrieve.

int $page_size: Integer number of items to be returned.

Return value

array An array of fieldable_panels_pane objects.

1 string reference to 'fieldable_panels_panes_services_index'
fieldable_panels_panes_services_resources in ./fieldable_panels_panes.services.inc
Implements hook_services_resources().

File

./fieldable_panels_panes.services.inc, line 339
Contains callbacks for service resource manipulation.

Code

function fieldable_panels_panes_services_index($page, $fields, array $parameters, $page_size, $options = array()) {
  $fpp_select = db_select('fieldable_panels_panes', 't')
    ->orderBy('bundle', 'ASC');
  services_resource_build_index_query($fpp_select, $page, $fields, $parameters, $page_size, 'fieldable_panels_pane', $options);
  $results = services_resource_execute_index_query($fpp_select);
  return services_resource_build_index_list($results, 'fieldable_panels_pane', 'fpid');
}