function lingotek_get_communities in Lingotek Translation 7.6
Same name and namespace in other branches
- 6 lingotek.api.inc \lingotek_get_communities()
- 7.2 lingotek.api.inc \lingotek_get_communities()
- 7.3 lingotek.api.inc \lingotek_get_communities()
- 7.4 lingotek.api.inc \lingotek_get_communities()
- 7.5 lingotek.remote.inc \lingotek_get_communities()
File
- ./
lingotek.remote.inc, line 507
Code
function lingotek_get_communities() {
$options = array();
if (!$_lingotek_client
->canLogIn()) {
return $options;
}
$list_communities = LingotekApi::instance()
->request("listCommunities", array());
if ($list_communities->results == "success") {
foreach ($list_communities->communities as $community) {
$options[$community->id] = $community->name;
}
}
return $options;
}