function lingotek_views_handler_source_status::render in Lingotek Translation 7.7
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- ./
lingotek_views_handler_source_status.inc, line 24 - A handler to supply source statuses.
Class
- lingotek_views_handler_source_status
- @file A handler to supply source statuses.
Code
function render($values) {
$value = $this
->get_value($values);
$entity_type = NULL;
$entity_id = NULL;
global $language;
$entity_type = $this->view->base_table;
if ($entity_type == 'node') {
$entity_id = $values->nid;
$entity = node_load($entity_id);
if ($this->options['relationship'] != 'NONE') {
}
}
if (!user_access('manage projects') && !user_access('translation')) {
return;
//do not show if the user does not have correct permissions
}
$upload_status = LingotekSync::getUploadStatus($entity_type, $value);
return $upload_status;
}