You are here

function domain_content_admin in Domain Access 7.3

Same name and namespace in other branches
  1. 5 domain_content/domain_content.module \domain_content_admin()
  2. 6.2 domain_content/domain_content.admin.inc \domain_content_admin()
  3. 7.2 domain_content/domain_content.admin.inc \domain_content_admin()

Content admin page callback.

Return value

A themed HTML batch content editing form.

1 string reference to 'domain_content_admin'
domain_content_view in domain_content/domain_content.admin.inc
Content administration for a specific domain.

File

domain_content/domain_content.admin.inc, line 178
Administration pages for Domain Content.

Code

function domain_content_admin($form, &$form_state) {
  $form['#attached']['css'] = array(
    drupal_get_path('module', 'domain_content') . '/domain_content.css',
  );
  if (isset($form_state['values']['operation']) && $form_state['values']['operation'] == 'delete') {
    $form = node_multiple_delete_confirm($form, $form_state, array_filter($form_state['values']['nodes']));

    // Set the proper path for form actions.
    $form['actions']['cancel']['#href'] = $form['actions']['cancel']['#options']['path'] = request_path();
    $form['#submit'][] = 'domain_content_delete_multiple_submit';
    return $form;
  }
  $form['filter'] = node_filter_form();
  $form['#submit'][] = 'node_filter_form_submit';

  // Privileged users can make global changes to Domain Access permissions.
  if (user_access('set domain access')) {
    domain_content_add_form_widget($form);
  }
  $form['admin'] = domain_content_form();
  $form['admin']['options']['submit']['#submit'][] = 'domain_content_process_nodes';

  // Filter the available operations based on user permissions.
  domain_content_filter_operations($form['admin']['options']['operation']['#options']);
  return $form;
}