function swf_list in SWF Tools 6.2
Same name and namespace in other branches
- 5 swftools.module \swf_list()
- 6 swftools.module \swf_list()
Take an array of play list data and options, and return a markup string.
Parameters
$playlist_data: A formatted array of data to be used to create the playlist. An appropriate array can be created from an array of filenames by calling swftools_prepare_playlist_data.
$options: An array of options to pass to the call to swf().
Return value
A string of markup to produce the playlist in a flash media player.
2 calls to swf_list()
- swf in ./
swftools.module - Return output, which might be embed markup, or pre-flash markup that includes the appropriate jQuery added to the <head>
- _swftools_filter_process_text in ./
swftools.module
File
- ./
swftools.module, line 139
Code
function swf_list($playlist_data, $options = array()) {
// Populate methods and othervars with playlist data
if (is_array($playlist_data)) {
// If action isn't set then set it
if (empty($options['methods']['action']) && isset($playlist_data['action'])) {
$options['methods']['action'] = $playlist_data['action'];
}
// If playlist_data isn't set then set it
if (empty($options['othervars']['playlist_data'])) {
$options['othervars']['playlist_data'] = $playlist_data;
}
// If playlist filename is set
if (isset($playlist_data['filename'])) {
$playlist = $playlist_data['filename'];
}
else {
$playlist = '';
}
// Produce markup
return swf($playlist, $options);
}
}