function globallink_fieldable_panels_get_translation_status in GlobalLink Connect for Drupal 7.5
Same name and namespace in other branches
- 7.6 globallink_fieldable_panels/globallink_fieldable_panels.inc \globallink_fieldable_panels_get_translation_status()
Gets fieldable panel translation status.
Parameters
string $fpid: The fieldable panel ID.
string $tgt_locale: The target locale.
string $title: The translation title.
Return value
string Status message.
1 call to globallink_fieldable_panels_get_translation_status()
- globallink_fieldable_panels_receive_form in globallink_fieldable_panels/
globallink_fieldable_panels_receive.inc - Builds form to receive a fieldable panels submission.
File
- globallink_fieldable_panels/
globallink_fieldable_panels.inc, line 514
Code
function globallink_fieldable_panels_get_translation_status($fpid, $tgt_locale, &$title) {
$query = db_select('globallink_core_fieldable_panels', 'tcfp');
$query
->condition('fpid', $fpid, '=');
$query
->condition('target', $tgt_locale, '=');
$query
->distinct();
$query
->fields('tcfp');
$results = $query
->execute();
foreach ($results as $row) {
$title = $row->title;
$entity = fieldable_panels_panes_load($fpid);
if (empty($entity)) {
return 'Source Deleted';
}
elseif ($row->status == 'Sent for Translations') {
return 'Translation Completed';
}
elseif ($row->status == 'Error') {
return 'Error';
}
}
return 'Sent for Translations';
}