You are here

function mobile_codes_field_formatter_info in Mobile Codes 5

Same name and namespace in other branches
  1. 6.2 includes/content.inc \mobile_codes_field_formatter_info()
  2. 6 mobile_codes.formatter.inc \mobile_codes_field_formatter_info()
  3. 7.2 includes/field.inc \mobile_codes_field_formatter_info()

@file

File

./mobile_codes.formatter.inc, line 8

Code

function mobile_codes_field_formatter_info() {
  $formatters = array();
  include_once drupal_get_path('module', 'mobile_codes') . '/mobile_codes.admin.inc';
  foreach (mobile_codes_get_presets() as $preset) {
    $formatters['mobile_codes_' . $preset->name . '_default'] = array(
      'label' => t('Mobile code: @preset image', array(
        '@preset' => $preset->name,
      )),
      'field types' => array(
        'text',
      ),
    );
    $formatters['mobile_codes_' . $preset->name . '_path'] = array(
      'label' => t('Mobile code: @preset file path', array(
        '@preset' => $preset->name,
      )),
      'field types' => array(
        'text',
      ),
    );
  }
  return $formatters;
}