You are here

function contentanalysisexample_analyzer_form_elements in Content Analysis 8

Same name and namespace in other branches
  1. 6 APIEXAMPLE/contentanalysisexample.module \contentanalysisexample_analyzer_form_elements()
  2. 7 APIEXAMPLE/contentanalysisexample.module \contentanalysisexample_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 formatted array defined in conentanalysis

$node: Node object

Return value

mixed

1 string reference to 'contentanalysisexample_analyzer_form_elements'
contentanalysisexample_contentanalysis_analyzers in APIEXAMPLE/contentanalysisexample.module
Implements 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;
}