function gathercontent_projects_list in GatherContent 7
Build an array of available GatherContent projects.
2 calls to gathercontent_projects_list()
- gathercontent_api_admin in ./
gathercontent_admin.inc - Settings form builder.
- gathercontent_import_content_type in ./
gathercontent.module - Import wizard step 1: Select content type.
File
- ./
gathercontent.module, line 366 - Imports pages from GatherContent (http://gathercontent.com/) into Drupal as nodes.
Code
function gathercontent_projects_list($projects) {
$projects_list = array();
if (is_object($projects) && isset($projects->projects) && is_array($projects->projects)) {
foreach ($projects->projects as $project) {
$projects_list[$project->id] = $project->name;
}
asort($projects_list);
}
return $projects_list;
}