You are here

function contentanalysis_page_analyzer_form in Content Analysis 7

Same name and namespace in other branches
  1. 8 contentanalysis.module \contentanalysis_page_analyzer_form()
  2. 6 contentanalysis.module \contentanalysis_page_analyzer_form()

Provides content analysis admin form

Parameters

$form_state: standard form_api form_state array

$analysis: contentanalysis formatted analysis array

Return value

form_api formatted array

See also

contentanalysis_analysis_form()

1 string reference to 'contentanalysis_page_analyzer_form'
contentanalysis_page_analyzer in ./contentanalysis.module
Generate contentanalysis_page_analyzer admin form.

File

./contentanalysis.module, line 177

Code

function contentanalysis_page_analyzer_form($form_state, $analysis) {
  $form['instructions'] = array(
    '#markup' => t('You can specify content to be analyzed using one of the three below methods. Use only one method. Either enter text content, use a numeric node id, or provide a URL to an existing webpage.'),
  );
  $form['input'] = array(
    '#type' => 'textarea',
    '#title' => t('Content'),
    '#default_value' => isset($analysis['#context']['inputs']['text']) ? $analysis['#context']['inputs']['text'] : '',
  );
  $form['input_nid'] = array(
    '#type' => 'textfield',
    '#title' => t('Node ID'),
    //'#autocomplete_path' => 'node/autocomplete',
    '#default_value' => isset($analysis['#context']['inputs']['nid']) ? $analysis['#context']['inputs']['nid'] : '',
  );
  $form['input_url'] = array(
    '#type' => 'textfield',
    '#title' => t('URL'),
    '#default_value' => isset($analysis['#context']['inputs']['url']) ? $analysis['#context']['inputs']['url'] : '',
  );
  $form = array_merge($form, contentanalysis_analysis_form($form_state, $analysis, array(), 'admin'));
  return $form;
}