public static function videojs_utility::getDisplaySettingsFormResults in Video.js (HTML5 Video Player) 7.3
2 calls to videojs_utility::getDisplaySettingsFormResults()
- videojs_field_formatter_settings_form_validate in ./
videojs.module - videojs_settings_form_submit in includes/
videojs.admin.inc - Submit handler for the videojs_settings_form() form.
File
- includes/
videojs.utility.inc, line 96 - This file will be used to keep all utility functions.
Class
- videojs_utility
- Helper functions for the Video.js module.
Code
public static function getDisplaySettingsFormResults(array $values) {
return array(
'loop' => !empty($values['loop']),
'autoplay' => !empty($values['autoplay']),
'hidecontrols' => !empty($values['hidecontrols']),
'width' => !empty($values['width']) ? intval($values['width']) : NULL,
'height' => !empty($values['height']) ? intval($values['height']) : NULL,
'centeredplaybutton' => !empty($values['centeredplaybutton']),
'preload' => !empty($values['preload']) ? $values['preload'] : NULL,
'defaulttrack' => !empty($values['defaulttrack']) ? $values['defaulttrack'] : NULL,
);
}