function video_embed_field_get_form in Video Embed Field 7
Same name and namespace in other branches
- 7.2 video_embed_field.module \video_embed_field_get_form()
Create a form from the player configuration options $defaults will be passed in with the default settings for the various fields
1 call to video_embed_field_get_form()
File
- ./
video_embed_field.module, line 395
Code
function video_embed_field_get_form($defaults) {
$handlers = video_embed_get_handlers();
$form = array();
foreach ($handlers as $domain => $handler) {
if (isset($handler['form']) && function_exists($handler['form'])) {
$handler_defaults = isset($defaults[$handler['title']]) ? $defaults[$handler['title']] : array();
$handler_defaults = array_merge($handler['defaults'], $handler_defaults);
$form[$handler['title']] = call_user_func($handler['form'], $handler_defaults);
$form[$handler['title']] += array(
'#type' => 'fieldset',
'#title' => t($handler['title']),
);
}
}
return $form;
}