function alchemy_contentanalysis_analyzer_form_elements in Alchemy 7
Same name and namespace in other branches
- 6 modules/alchemy_contentanalysis/alchemy_contentanalysis.module \alchemy_contentanalysis_analyzer_form_elements()
Implements hook_analyzer_form_elements() via custom define callback ().
hook to add any analyzier specific form elements to the content analyzer form. callback is defined in hook_contentanalysis_analyzers ['form elements callback']
Parameters
$form_state: Array defined by form_api
$analysis: Array analysis formated array defined in conentanalysis
$node: Node object
1 string reference to 'alchemy_contentanalysis_analyzer_form_elements'
- alchemy_contentanalysis_contentanalysis_analyzer_info in modules/
alchemy_contentanalysis/ alchemy_contentanalysis.module - Implentation of hook_contentanalysis_analyzers() register kwanalysis with contentanalysis analyzers registry
File
- modules/
alchemy_contentanalysis/ alchemy_contentanalysis.module, line 77
Code
function alchemy_contentanalysis_analyzer_form_elements($form_state, $analysis = '', $node = 0) {
drupal_add_js(drupal_get_path('module', 'alchemy_contentanalysis') . '/alchemy_contentanalysis.js');
$options = alchemy_contentanalysis_get_types();
$form['alchemy_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Alchemy data types'),
'#options' => $options,
'#default_value' => variable_get('alchemy_contentanalysis_defaulttypes', alchemy_contentanalysis_get_types(TRUE)),
'#description' => t('Use the above checkboxes to select what types of data you want to report.'),
'#prefix' => '<div id="alchemy_contentanalysis_types">',
'#suffix' => '</div>',
);
$form['alchemy_usecache'] = array(
'#type' => 'checkbox',
'#title' => t('Use cached data if available.'),
'#default_value' => variable_get('alchemy_contentanalysis_defaultusecache', ''),
'#description' => t('Check the above box to retrieve the data from the previous Alchemy call. If unchecked, the data will be sent Alchemy for a fresh analysis.'),
'#prefix' => '<div id="alchemy_contentanalysis_cache">',
'#suffix' => '</div>',
);
return $form;
}