function domain_nodes_form in Domain Access 7.3
FormAPI to set default domain settings per content type.
1 string reference to 'domain_nodes_form'
- domain_menu in ./
domain.module - Implements hook_menu().
File
- ./
domain.admin.inc, line 1013 - Administration functions for the domain module.
Code
function domain_nodes_form($form, &$form_state) {
$form = array();
$node_types = node_type_get_names();
$options = array(
DOMAIN_ALL => t('All domains'),
DOMAIN_ACTIVE => t('Author\'s currently active domain'),
);
foreach (domain_domains() as $key => $value) {
$options[$value['machine_name']] = $value['sitename'];
}
foreach ($options as $key => $value) {
$form['#domain_node'][$key] = $value;
}
foreach ($node_types as $type => $name) {
$default_values = domain_default_node_access_settings($type);
$form['domain_node']['domain_node_' . $type] = array(
'#type' => 'checkboxes',
'#tree' => TRUE,
'#options' => $options,
'#default_value' => $default_values,
);
}
$form = system_settings_form($form);
// System settings form adds a theme we cannot use.
unset($form['#theme']);
return $form;
}