function domain_advanced_form in Domain Access 5
Same name and namespace in other branches
- 6.2 domain.admin.inc \domain_advanced_form()
- 7.2 domain.admin.inc \domain_advanced_form()
FormsAPI
Parameters
$node_types: A list of active node types taken from node_get_types().
1 string reference to 'domain_advanced_form'
- domain_advanced in ./
domain_admin.inc - Advanced node-type settings
File
- ./
domain_admin.inc, line 686 - Administration functions for the domain module.
Code
function domain_advanced_form($node_types) {
$form = array();
// Some editors will not have full node editing permissions. This allows us
// to give selected permissions for nodes within the editor's domain.
if (variable_get('domain_editors', DOMAIN_EDITOR_RULE) == 1) {
$form['domain_form'] = array(
'#type' => 'fieldset',
'#title' => t('Domain node editing'),
'#collapsible' => TRUE,
);
$form['domain_form']['intro'] = array(
'#value' => t('<p>When editors view domain-access restricted nodes, which form elements should be exposed?</p>'),
);
$options = array(
'log' => t('Log messages'),
'options' => t('Publishing options'),
'delete' => t('Delete node'),
'comment_settings' => t('Comment settings'),
'path' => t('Path aliasing'),
'attachments' => t('File attachments'),
);
ksort($options);
$form['domain_form']['domain_form_elements'] = array(
'#type' => 'checkboxes',
'#default_value' => variable_get('domain_form_elements', array(
'options',
'delete',
'comment_settings',
'path',
)),
'#options' => $options,
);
}
$default = variable_get('domain_behavior', DOMAIN_INSTALL_RULE);
$form['domain_node'] = array(
'#type' => 'fieldset',
'#title' => t('Domain node types'),
'#collapsible' => TRUE,
);
$form['domain_node']['intro'] = array(
'#value' => t('<p>Check the content types that should be published to all affiliates when new content is created. <br /><em>NOTE: These settings only apply if the "New content settings" option is set to "Only show on selected sites."</em></p>'),
);
foreach ($node_types as $key => $value) {
$form['domain_node']['domain_node_' . $key] = array(
'#type' => 'checkbox',
'#title' => check_plain($value),
'#default_value' => variable_get('domain_node_' . $key, $default),
);
}
return system_settings_form($form);
}