function pmpapi_fetch_group in Public Media Platform API Integration 7
Fetches a single PMP group from the API.
Parameters
string $guid: A PMP GUID
Return value
object A PMP doc.
1 call to pmpapi_fetch_group()
- pmpapi_groups_edit_form in pmpapi_groups/
pmpapi_groups.admin.inc - Form constructor for the PMPAPI edit groups form.
File
- ./
pmpapi.module, line 226 - Creates basic calls to the PMP API.
Code
function pmpapi_fetch_group($guid) {
$pmp = new PMPAPIDrupal();
$pmp
->pull(array(
'guid' => $guid,
'limit' => 1000,
));
if (empty($pmp->errors) && !empty($pmp->query->results->docs[0])) {
return $pmp->query->results->docs[0];
}
return array();
}