function node_gallery_image_item_edit_form in Node Gallery 6
Same name and namespace in other branches
- 6.3 node_gallery.pages.inc \node_gallery_image_item_edit_form()
- 6.2 node_gallery.pages.inc \node_gallery_image_item_edit_form()
1 call to node_gallery_image_item_edit_form()
File
- ./
node_gallery.pages.inc, line 290 - Node gallery pages.
Code
function node_gallery_image_item_edit_form($image, $config) {
module_load_include('inc', 'node', 'node.pages');
$form_state = array();
$display_fields = $config->display_fields;
$form = drupal_retrieve_form($image->type . '_node_form', $form_state, $image);
drupal_prepare_form($image->type . "_node_form", $form, $form_state);
foreach (array_values($display_fields) as $field_name) {
if (!empty($field_name)) {
$item_form[$field_name] = (array) get_image_form_item_recursive($form, $field_name);
}
}
$item_form += (array) get_image_form_value_items($form);
set_image_form_default_values($item_form, $image, $config);
return $item_form;
}