function jplayer_style_plugin::options_form in jPlayer 6
Same name and namespace in other branches
- 7.2 includes/jplayer_style_plugin.inc \jplayer_style_plugin::options_form()
File
- includes/
jplayer_style_plugin.inc, line 22 - Display style plugin for Views that renders rows as a jPlayer playlist.
Class
- jplayer_style_plugin
- Style plugin to display a jPlayer playlist.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Build a list of all fields.
$options = array();
foreach ($this->display->handler
->get_handlers('field') as $field => $handler) {
if ($label = $handler
->label()) {
$options[$field] = $label;
}
else {
$options[$field] = $handler
->ui_name();
}
}
if (empty($options)) {
$options[''] = t('No available fields');
}
$form['path_field'] = array(
'#type' => 'select',
'#title' => t('File path fields'),
'#options' => $options,
'#multiple' => TRUE,
'#size' => 4,
'#default_value' => $this->options['path_field'],
'#description' => t('Select the fields that will contain a file path to an mp3 file. If multiple fields are selected, the first one that contains a value will be used. This field will be hidden from view unless there are no other fields visible'),
'#weight' => -5,
);
}