You are here

function link_field_info in Link 7

Same name and namespace in other branches
  1. 5 link.module \link_field_info()
  2. 6.2 link.module \link_field_info()
  3. 6 link.module \link_field_info()

Implements hook_field_info().

File

./link.module, line 48
Defines simple link field types.

Code

function link_field_info() {
  return array(
    'link_field' => array(
      'label' => t('Link'),
      'description' => t('Store a title, href, and attributes in the database to assemble a link.'),
      'settings' => array(
        'attributes' => _link_default_attributes(),
        'url' => 0,
        'title' => 'optional',
        'title_value' => '',
        'title_maxlength' => 128,
        'enable_tokens' => 1,
        'display' => array(
          'url_cutoff' => 80,
        ),
      ),
      'instance_settings' => array(
        'attributes' => _link_default_attributes(),
        'url' => 0,
        'title' => 'optional',
        'title_value' => '',
        'title_label_use_field_label' => FALSE,
        'title_maxlength' => 128,
        'enable_tokens' => 1,
        'convert_aliases' => 0,
        'display' => array(
          'url_cutoff' => 80,
        ),
        'validate_url' => 1,
        'absolute_url' => 1,
      ),
      'default_widget' => 'link_field',
      'default_formatter' => 'link_default',
      // Support hook_entity_property_info() from contrib "Entity API".
      'property_type' => 'field_item_link',
      'property_callbacks' => array(
        'link_field_property_info_callback',
      ),
    ),
  );
}