You are here

function bulk_photo_nodes_page_get in Bulk File Nodes 7

Return bulk node add form.

1 call to bulk_photo_nodes_page_get()
bulk_photo_nodes_page in ./bulk_photo_nodes.module
Page callback: Displays the first step of the bulk photo node upload form.
1 string reference to 'bulk_photo_nodes_page_get'
bulk_photo_nodes_menu in ./bulk_photo_nodes.module
Implements hook_menu().

File

./bulk_photo_nodes.module, line 232
hooks and helper functions for bulk photo node.

Code

function bulk_photo_nodes_page_get($node_type) {
  drupal_add_css(drupal_get_path('module', 'bulk_photo_nodes') . '/css/bulk_photo_nodes_default.css');
  $content = array();
  $form_names = module_invoke_all('bulk_photo_nodes_method');
  $content_forms = array();
  $chosen_form = FALSE;
  foreach ($form_names as $form_name) {
    $form = drupal_get_form($form_name, $node_type);
    $content_forms[] = $form;
    if (array_key_exists('#bpn_chosen_form', $form)) {
      $chosen_form = $form;
      break;
    }
  }

  // If we've chosen a form, only include that one.
  if ($chosen_form) {
    $content['forms'] = array(
      $chosen_form,
    );
  }
  else {
    $content['forms'] = $content_forms;
  }
  return $content;
}