function contentanalysisexample_analyzer_form_elements in Content Analysis 6
Same name and namespace in other branches
- 8 APIEXAMPLE/contentanalysisexample.module \contentanalysisexample_analyzer_form_elements()
- 7 APIEXAMPLE/contentanalysisexample.module \contentanalysisexample_analyzer_form_elements()
Implementation of 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 'contentanalysisexample_analyzer_form_elements'
- contentanalysisexample_contentanalysis_analyzers in APIEXAMPLE/
contentanalysisexample.module - Implentation of hook_contentanalysis_analyzers() register contentanalysisexample with contentanalysis analyzers registry
File
- APIEXAMPLE/
contentanalysisexample.module, line 37 - An example content analyzer using the Content Analysis API
Code
function contentanalysisexample_analyzer_form_elements($form_state, $analysis = '', $node = 0) {
drupal_add_css(drupal_get_path('module', 'contentanalysisexample') . '/contentanalysisexample.css');
drupal_add_js(drupal_get_path('module', 'contentanalysisexample') . '/contentanalysisexample.js');
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('Whats your name'),
);
return $form;
}