function scald_gallery_scald_add_form_fill in Scald: Gallery 7
Same name and namespace in other branches
- 7.2 scald_gallery.module \scald_gallery_scald_add_form_fill()
Implements hook_scald_add_form_fill().
File
- ./
scald_gallery.module, line 140 - Scald Gallery is a Scald Atom Provider for image galleries.
Code
function scald_gallery_scald_add_form_fill(&$atom, $form, $form_state) {
$gallery_items = _scald_gallery_save_items($form_state);
$atom->gallery_items[LANGUAGE_NONE] = array_map(function ($item) {
return array(
'sid' => $item->sid,
);
}, $gallery_items);
$atom->scald_thumbnail[LANGUAGE_NONE][0] = (array) $gallery_items[0]->scald_thumbnail[LANGUAGE_NONE][0];
}