function lingotek_get_phase_name in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.remote.inc \lingotek_get_phase_name()
- 7.2 lingotek.api.inc \lingotek_get_phase_name()
- 7.3 lingotek.api.inc \lingotek_get_phase_name()
- 7.4 lingotek.api.inc \lingotek_get_phase_name()
- 7.5 lingotek.remote.inc \lingotek_get_phase_name()
Gets the phase name of the specified phase.
This fetches a workflow step's name (known as a Phase in the Lingotek platform).
@todo Move the actual call to getPhase onto LingotekApi class.
Parameters
int $phase_id: A Lingotek phase ID.
Return value
string Name for the workflow step (phase name).
1 call to lingotek_get_phase_name()
- lingotek_get_workbench_url_by_phases in ./
lingotek.remote.inc - Get the url to open the Lingotek Workbench.
File
- ./
lingotek.remote.inc, line 582
Code
function lingotek_get_phase_name($phase_id) {
$phases =& drupal_static(__FUNCTION__);
$phase_name = '';
if (!empty($phases[$phase_id])) {
$phase_name = $phases[$phase_id]->name;
}
else {
$params = array(
'phaseId' => $phase_id,
);
$output = LingotekApi::instance()
->request('getPhase', $params);
if ($output->results == 'success') {
$phases[$phase_id] = $output;
$phase_name = $output->name;
}
}
return $phase_name;
}