function lingotek_get_workbench_url in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.2 lingotek.api.inc \lingotek_get_workbench_url()
- 7.3 lingotek.api.inc \lingotek_get_workbench_url()
- 7.4 lingotek.api.inc \lingotek_get_workbench_url()
- 7.5 lingotek.remote.inc \lingotek_get_workbench_url()
- 7.6 lingotek.remote.inc \lingotek_get_workbench_url()
Get the url to open the Lingotek Workbench.
This fetches a link.
Parameters
object $node: A Drupal node.
$lingotek_locale: A target language.
mixed $label: The label to use as text for the link. Possible values are TRUE, FALSE, or a string to use as a the custom label for the link.
Return value
string Either a link pointing the the url, or the url itself if $label is FALSE
5 calls to lingotek_get_workbench_url()
- lingotek_download_translations_form in ./
lingotek.page.inc - Download Translations Form.
- lingotek_form_node_form_alter in ./
lingotek.module - Implements hook_form_BASE_FORM_ID_alter().
- lingotek_lang_icons in ./
lingotek.bulk_grid.inc - lingotek_node_view in ./
lingotek.module - Implements hook_node_view().
- lingotek_workbench_icon in ./
lingotek.util.inc
File
- ./
lingotek.remote.inc, line 736
Code
function lingotek_get_workbench_url($document_id, $lingotek_locale = '', $label = FALSE) {
if (empty($document_id)) {
return '';
}
if ($label) {
return l($label, LINGOTEK_API_SERVER . '/workbench/document/' . $document_id . '/locale/' . $lingotek_locale, array(
'attributes' => array(
'target' => '_blank',
),
));
}
return LINGOTEK_API_SERVER . '/workbench/document/' . $document_id . '/locale/' . $lingotek_locale;
}