function views_handler_field_bean_operations::render_link in Bean (for Drupal 7) 7
1 call to views_handler_field_bean_operations::render_link()
- views_handler_field_bean_operations::render in views/
views_handler_field_bean_operations.inc - Render the field.
File
- views/
views_handler_field_bean_operations.inc, line 37 - Definition of views_handler_field_bean_operations.
Class
- views_handler_field_bean_operations
- Field handler to present the contextual links of the bean block.
Code
function render_link($bean) {
if (entity_access('update', 'bean', $bean)) {
// Get the operations links.
$links = menu_contextual_links('bean', 'block', array(
$bean->delta,
));
if (!empty($links)) {
// Add the destination to the links if specified.
if ($this->options['add_destination']) {
foreach ($links as $id => &$link) {
$link['query'] = drupal_get_destination();
}
}
return theme('links', array(
'links' => $links,
'attributes' => array(
'class' => array(
'links',
'inline',
'operations',
),
),
));
}
}
}