function brightcove_field_field_formatter_info in Brightcove Video Connect 7.2
Same name and namespace in other branches
- 7.3 brightcove_field/brightcove_field.module \brightcove_field_field_formatter_info()
- 7.4 brightcove_field/brightcove_field.module \brightcove_field_field_formatter_info()
- 7.5 brightcove_field/brightcove_field.module \brightcove_field_field_formatter_info()
Implementation of hook_formatter_info().
File
- brightcove_field/
brightcove_field.module, line 308 - Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.
Code
function brightcove_field_field_formatter_info() {
$formatters = array();
$formatters['default'] = array(
'label' => t('Standard video player'),
'field types' => array(
'brightcove_video',
),
'settings' => array(
'width' => BRIGHTCOVE_DEFAULT_VIDEO_WIDTH,
'height' => BRIGHTCOVE_DEFAULT_VIDEO_HEIGHT,
),
);
$formatters['entity_link_videoStillURL'] = array(
'label' => t('Default still image linked to entity'),
'field types' => array(
'brightcove_video',
),
);
$formatters['entity_link_thumbnailURL'] = array(
'label' => t('Default thumbnail linked to entity'),
'field types' => array(
'brightcove_video',
),
);
$formatters['entity_image_videoStillURL'] = array(
'label' => t('Default still image'),
'field types' => array(
'brightcove_video',
),
);
$formatters['entity_image_thumbnailURL'] = array(
'label' => t('Default thumbnail'),
'field types' => array(
'brightcove_video',
),
);
$formatters['dialog_player_videoStillURL'] = array(
'label' => t('Default still image -> Dialog player'),
'field types' => array(
'brightcove_video',
),
);
$formatters['dialog_player_thumbnailURL'] = array(
'label' => t('Default thumbnail -> Dialog player'),
'field types' => array(
'brightcove_video',
),
);
$styles = image_styles();
foreach ($styles as $style) {
$formatters['dialog_' . $style['name'] . '__thumbnailURL'] = array(
'label' => t('Image style @style thumbnail -> Dialog player', array(
'@style' => $style['name'],
)),
'field types' => array(
'brightcove_video',
),
);
$formatters['dialog_' . $style['name'] . '__videoStillURL'] = array(
'label' => t('Image style @style still image -> Dialog player', array(
'@style' => $style['name'],
)),
'field types' => array(
'brightcove_video',
),
);
$formatters['entity_link_' . $style['name'] . '__videoStillURL'] = array(
'label' => t('Image style @style still image linked to entity', array(
'@style' => $style['name'],
)),
'field types' => array(
'brightcove_video',
),
);
$formatters['entity_link_' . $style['name'] . '__thumbnailURL'] = array(
'label' => t('Image style @style thumbnail linked to entity', array(
'@style' => $style['name'],
)),
'field types' => array(
'brightcove_video',
),
);
$formatters['entity_image_' . $style['name'] . '__videoStillURL'] = array(
'label' => t('Image style @style still image', array(
'@style' => $style['name'],
)),
'field types' => array(
'brightcove_video',
),
);
$formatters['entity_image_' . $style['name'] . '__thumbnailURL'] = array(
'label' => t('Image style @style thumbnail', array(
'@style' => $style['name'],
)),
'field types' => array(
'brightcove_video',
),
);
}
foreach (_brightcove_field_get_object_formatter_keys() as $key => $label) {
$formatters["brightcove_metadata_{$key}"] = array(
'label' => t("Metadata: {$label}"),
'field types' => array(
'brightcove_video',
),
);
}
return $formatters;
}