You are here

function iframe_formatter_asurl_helper in Iframe 7

Formatter function for 'asurl' text field formatter.

1 call to iframe_formatter_asurl_helper()
iframe_field_formatter_view in ./iframe.module
Implements hook_field_formatter_view().

File

./iframe.module, line 425
Defines an iframe field with all attributes.

Code

function iframe_formatter_asurl_helper($item, $delta) {

  // If no url given display nothing.
  if (empty($item['url'])) {
    return '';
  }

  // Display all
  $linktext = empty($item['title']) ? $item['url'] : $item['title'];
  return l($linktext, $item['url'], $item);
}