You are here

function ds_test_ds_fields_info in Display Suite 7

Same name and namespace in other branches
  1. 7.2 tests/ds_test.module \ds_test_ds_fields_info()

Implements hook_ds_fields_info().

File

tests/ds_test.module, line 106
Display Suite test module.

Code

function ds_test_ds_fields_info($entity_type) {
  if ($entity_type == 'node') {
    $fields['node']['ds_test_field'] = array(
      'title' => t('Test code field from hook'),
      'field_type' => DS_FIELD_TYPE_FUNCTION,
      'function' => 'dstest_render_test_field',
    );
    $fields['node']['ds_test_field_2'] = array(
      'title' => t('Test code field from hook 2'),
      'field_type' => DS_FIELD_TYPE_FUNCTION,
      'function' => 'dstest_render_test_field',
    );
    return $fields;
  }
}