You are here

function mobile_codes_field_formatter_info in Mobile Codes 6

Same name and namespace in other branches
  1. 5 mobile_codes.formatter.inc \mobile_codes_field_formatter_info()
  2. 6.2 includes/content.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();
  module_load_include('admin.inc', 'mobile_codes');
  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;
}