You are here

function field_redirection_field_formatter_info in Field Redirection 7.2

Same name and namespace in other branches
  1. 7 field_redirection.module \field_redirection_field_formatter_info()

Implements hook_field_formatter_info().

File

./field_redirection.module, line 22
Provides a field formatter to redirect to another path.

Code

function field_redirection_field_formatter_info() {
  return array(
    'field_redirection' => array(
      'label' => t('Redirect'),
      // Default settings.
      'settings' => array(
        'code' => '301',
        '404_if_empty' => FALSE,
        // Flag to indicate how to show blocks on pages:
        // 0 = Ignore the setting.
        // 1 = Redirect on all except listed pages.
        // 2 = Redirect only on listed pages.
        'page_restrictions' => 0,
        'pages' => '',
      ),
      // The supported field types.
      'field types' => array(
        'entityreference',
        'file',
        'image',
        'link_field',
        'node_reference',
        'taxonomy_term_reference',
        'url',
        'user_reference',
      ),
    ),
  );
}