function data_node_render_remove_link in Data 6
Render a remove link for a given item.
4 calls to data_node_render_remove_link()
- data_node_active_page in data_node/
data_node.module - Page callback for setting the active node.
- data_node_add_page in data_node/
data_node.module - Page callback for adding.
- data_node_remove_page in data_node/
data_node.module - Page callback for removing.
- data_node_views_handler_field_add_remove::render in data_node/
views/ data_node_views_handler_field_add_remove.inc
File
- data_node/
data_node.module, line 441 - Hooks and API functions for Data Node module.
Code
function data_node_render_remove_link($table, $id, $nid) {
drupal_add_css(drupal_get_path('module', 'data_node') . '/data_node.css');
drupal_add_js(drupal_get_path('module', 'data_node') . '/data_node.js');
$title = _data_node_get_title($nid);
$table_name = $table
->get('name');
$class = "data_node_link-{$table_name}-{$id}-{$nid}";
return l(t('Remove from !title', array(
'!title' => $title,
)), data_node_remove_path($table, $id, $nid), array(
'attributes' => array(
'class' => "data-node-remove {$class}",
),
'query' => drupal_get_destination(),
));
}