function pmpapi_get_properties in Public Media Platform API Integration 7
Create a list of all PMP properties (essentially 'programs')
Return value
array An array of property GUID (key) and property name (value)
1 call to pmpapi_get_properties()
- pmpapi_pull_filter_form in pmpapi_pull/
pmpapi_pull.pages.inc - Form constructor for the PMPAPI pull search form.
File
- ./
pmpapi.module, line 724 - Creates basic calls to the PMP API.
Code
function pmpapi_get_properties() {
$properties = array();
$pmp = pmpapi_query(array(
'profile' => 'property',
'limit' => 10000,
));
if (!empty($pmp->query->results->docs)) {
foreach ($pmp->query->results->docs as $doc) {
$properties[$doc->attributes->guid] = $doc->attributes->title;
}
}
asort($properties);
return $properties;
}