function theme_swftools_formatter_swftools in SWF Tools 6.2
Same name and namespace in other branches
- 6.3 includes/swftools.theme.inc \theme_swftools_formatter_swftools()
Theme function to turn CCK filefield in to flash content.
Parameters
$element: The element to render.
Return value
A string of markup to produce the flash content, or nothing if the element was empty.
1 string reference to 'theme_swftools_formatter_swftools'
- swftools_theme in ./
swftools.module - Implementation of hook_theme
File
- ./
swftools.module, line 1835
Code
function theme_swftools_formatter_swftools($element) {
// If the element is empty return
if (empty($element['#item']['fid'])) {
return '';
}
// Get the markup for the flash content from swf()
$return = swf($element['#item']['filepath']);
// Add the filefield download link if required
if ($element['#formatter'] == 'swftools') {
$return .= "\n" . theme('filefield_formatter_default', $element);
}
// Return the resulting markup
return $return;
}