function insight_admin_settings_form in Insight 7
@file Admin page callback for the insight module.
1 string reference to 'insight_admin_settings_form'
- insight_menu in ./
insight.module - Implements hook.().
File
- ./
insight.admin.inc, line 9 - Admin page callback for the insight module.
Code
function insight_admin_settings_form() {
$analyzer_defs = insight_analyzer_info(TRUE);
$analyzer_defs_meta = $analyzer_defs['#meta'];
unset($analyzer_defs['#meta']);
$form['contentanalysis'] = array(
'#type' => 'fieldset',
'#title' => t('Content analysis'),
//'#description' => t('Check the below boxes to display widgets in node links by content types.'),
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$options = array();
//dsm($analyzer_defs_meta);
foreach ($analyzer_defs_meta['analyzers_by_type']['content'] as $analyzer_name) {
$options[$analyzer_name] = $analyzer_defs[$analyzer_name]['title'];
}
$form['contentanalysis']['insight_contentanalysis_autorun_analyzers'] = array(
'#type' => 'checkboxes',
'#title' => t('Auto run analyzers'),
'#description' => t('Check any analyzers you want to enable for auto run analysis.'),
'#options' => $options,
'#default_value' => variable_get('insight_contentanalysis_autorun_analyzers', array()),
);
$form['contentanalysis']['insight_contentanalysis_autorun'] = array(
'#markup' => '<label>' . t('Auto run event triggers') . '</label>',
);
$form['contentanalysis']['insight_contentanalysis_autorun_on_nodesave'] = array(
'#type' => 'checkbox',
'#title' => t('Auto analyze on node save'),
'#description' => t('Content analysis will be run whenever a node is saved.'),
'#default_value' => variable_get('insight_contentanalysis_autorun_on_nodesave', INSIGHT_CONTENTANALYSIS_AUTORUN_ON_NODESAVE_DEFAULT),
);
$form['contentanalysis']['insight_contentanalysis_autorun_on_cron'] = array(
'#type' => 'checkbox',
'#title' => t('Auto analyze on cron'),
'#description' => t('Content analysis will be run when cron runs.'),
'#default_value' => variable_get('insight_contentanalysis_autorun_on_cron', INSIGHT_CONTENTANALYSIS_AUTORUN_ON_CRON_DEFAULT),
);
return system_settings_form($form);
}