function soundmanager2_field_formatter_info in SoundManager2 6
Same name and namespace in other branches
- 7.2 soundmanager2.module \soundmanager2_field_formatter_info()
Implementation of hook_field_formatter_info().
All fields should have a 'default' formatter. Any number of other formatters can be defined as well. It's nice for there always to be a 'plain' option for the raw value, but that is not required.
File
- ./
soundmanager2.module, line 131
Code
function soundmanager2_field_formatter_info() {
$formatterinfo_filefield = array();
$formatterinfo_audio = array();
if (module_exists('filefield')) {
$formatterinfo_filefield = array(
// The machine name of the formatter.
'soundmanager2' => array(
// The human-readable label shown on the Display
// fields screen.
'label' => t('SoundManager 2'),
// An array of the field types this formatter
// can be used on.
'field types' => array(
'filefield',
),
// CONTENT_HANDLE_CORE: CCK will pass the formatter
// a single value.
// CONTENT_HANDLE_MODULE: CCK will pass the formatter
// an array of all the values. None of CCK's core
// formatters use multiple values, that is an option
// available to other modules that want it.
//'multiple values' => CONTENT_HANDLE_CORE,
'multiple values' => CONTENT_HANDLE_MODULE,
),
);
}
if (module_exists('audio')) {
$formatterinfo_audio = array(
'audiosm2' => array(
'label' => t('Audio integration. Soundmanager2'),
'field types' => array(
'nodereference',
),
'multiple values' => CONTENT_HANDLE_MODULE,
),
);
}
$formatterinfo = array_merge($formatterinfo_filefield, $formatterinfo_audio);
return $formatterinfo;
}