You are here

function starrating_field_formatter_info in Star Rating 7.2

Implements hook_field_formatter_info().

File

./starrating.module, line 39
Provides star rating field, formatter and widget using Field API. star rating field is based on integer value and convert it to the HTML code that displays series of icons. The formatter supports not only star rating field type but also…

Code

function starrating_field_formatter_info() {
  return array(
    'starrating_rating_formatter' => array(
      'label' => t('Star rating'),
      'field types' => array(
        'list_integer',
      ),
      'settings' => array(
        'fill_blank' => 1,
        'icon_type' => 'star',
        'icon_color' => 1,
      ),
    ),
    'starrating_rating_value_formatted' => array(
      'label' => t('Star rating value'),
      'field types' => array(
        'list_integer',
      ),
    ),
    'starrating_rating_value_int' => array(
      'label' => t('Star rating value as int (especially for math calculations in views)'),
      'field types' => array(
        'list_integer',
      ),
    ),
  );
}