function lingotek_get_project_name in Lingotek Translation 7.7
Return value
string The name of the vault currently in use
1 call to lingotek_get_project_name()
- lingotek_admin_account_status_form in ./
lingotek.admin.inc - Form constructor for the administration form.
File
- ./
lingotek.util.inc, line 1532 - Utility functions.
Code
function lingotek_get_project_name() {
$project_defaults = LingotekApi::instance()
->listProjects();
$project_id = variable_get('lingotek_project', '');
if (empty($project_defaults)) {
return '';
}
foreach ($project_defaults as $key => $project_name) {
if ("{$key}" === "{$project_id}") {
return $project_name;
}
}
return '';
}