function lingotek_get_entity_edit_link in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lingotek.bulk_grid.inc \lingotek_get_entity_edit_link()
- 7.5 lingotek.bulk_grid.inc \lingotek_get_entity_edit_link()
1 call to lingotek_get_entity_edit_link()
File
- ./
lingotek.bulk_grid.inc, line 1806
Code
function lingotek_get_entity_edit_link($entity_type, $entity_id, $url_only = FALSE) {
$edit_link = "";
$query = array();
$query['destination'] = 'admin/settings/lingotek/manage/' . $entity_type;
switch ($entity_type) {
case 'fieldable_panels_pane':
$edit_link = 'admin/structure/fieldable-panels-panes/view/' . $entity_id . '/edit';
break;
case 'taxonomy_term':
$edit_link = 'taxonomy/term/' . $entity_id . '/edit';
break;
case 'message_type':
return '';
default:
$edit_link = $entity_type . '/' . $entity_id . '/edit';
break;
}
return $url_only ? url($edit_link, array(
'query' => $query,
)) : l('<i title="' . t('Edit') . '" class="fa fa-edit"></i>', $edit_link, array(
'html' => TRUE,
'attributes' => array(
'target' => '_blank',
),
'query' => $query,
));
}