function link_field_formatter_info

Implements hook_field_formatter_info().

File

drupal/core/modules/field/modules/link/link.module, line 212
Defines simple link field types.

Code

function link_field_formatter_info() {
  $formatters['link'] = array(
    'label' => t('Link'),
    'field types' => array(
      'link',
    ),
    'settings' => array(
      'trim_length' => 80,
      'rel' => NULL,
      'target' => NULL,
      'url_only' => FALSE,
      'url_plain' => FALSE,
    ),
  );

  // @todo Merge into 'link' formatter once there is a #type like 'item' that
  //   can render a compound label and content outside of a form context.
  $formatters['link_separate'] = array(
    'label' => t('Separate title and URL'),
    'field types' => array(
      'link',
    ),
    'settings' => array(
      'trim_length' => 80,
      'rel' => NULL,
      'target' => NULL,
    ),
  );
  return $formatters;
}