function domain_content_admin in Domain Access 7.2
Same name and namespace in other branches
- 5 domain_content/domain_content.module \domain_content_admin()
- 6.2 domain_content/domain_content.admin.inc \domain_content_admin()
- 7.3 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. This callback puts the user on the current domain and then fetches the appropirate content for batch editing.
File
- domain_content/
domain_content.admin.inc, line 182 - 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;
}