You are here

function field_collection_views_handler_area_add_link::render in Field Collection Views 7

Same name and namespace in other branches
  1. 8 views/field_collection_views_handler_area_add_link.inc \field_collection_views_handler_area_add_link::render()

Render the area.

Overrides views_handler_area::render

File

views/field_collection_views_handler_area_add_link.inc, line 14
Definition of field_collection_views_handler_area.

Class

field_collection_views_handler_area_add_link
Field handler to present a field collection add link.

Code

function render($empty = FALSE) {
  if (!field_collection_item_access('add')) {
    return;
  }
  $path = $this->view->args[1];
  $text = !empty($this->options['label']) ? $this->options['label'] : t('add');
  return l($text, $path, array(
    'query' => drupal_get_destination(),
  ));
}