You are here

function field_test_field_formatter_info in Drupal 7

Implements hook_field_formatter_info().

2 calls to field_test_field_formatter_info()
FieldInfoTestCase::testFieldInfo in modules/field/tests/field.test
Test that field types and field definitions are correcly cached.
FieldInfoTestCase::testSettingsInfo in modules/field/tests/field.test
Test that the field_info settings convenience functions work.

File

modules/field/tests/field_test.field.inc, line 263
Defines a field type and its formatters and widgets.

Code

function field_test_field_formatter_info() {
  return array(
    'field_test_default' => array(
      'label' => t('Default'),
      'description' => t('Default formatter'),
      'field types' => array(
        'test_field',
      ),
      'settings' => array(
        'test_formatter_setting' => 'dummy test string',
      ),
    ),
    'field_test_multiple' => array(
      'label' => t('Multiple'),
      'description' => t('Multiple formatter'),
      'field types' => array(
        'test_field',
      ),
      'settings' => array(
        'test_formatter_setting_multiple' => 'dummy test string',
      ),
    ),
    'field_test_with_prepare_view' => array(
      'label' => t('Tests hook_field_formatter_prepare_view()'),
      'field types' => array(
        'test_field',
      ),
      'settings' => array(
        'test_formatter_setting_additional' => 'dummy test string',
      ),
    ),
  );
}