function contentanalysis_page_analyzer_form in Content Analysis 6
Same name and namespace in other branches
- 8 contentanalysis.module \contentanalysis_page_analyzer_form()
- 7 contentanalysis.module \contentanalysis_page_analyzer_form()
Provides content analysis admin form
- prepends three admin form input fields
- merges form from contentanalysis_analysis_form()
Parameters
$form_state: standard form_api form_state array
$analysis: contentanalysis formated analysis array
Return value
form_api formated array
See also
contentanalysis_analysis_form()
1 string reference to 'contentanalysis_page_analyzer_form'
- contentanalysis_page_analyzer in ./
contentanalysis.module - Presents analyzer admin form
File
- ./
contentanalysis.module, line 136
Code
function contentanalysis_page_analyzer_form($form_state, $analysis) {
$form['instructions'] = array(
'#value' => 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' => $analysis ? $analysis['#context']['inputs']['text'] : '',
);
$form['input_nid'] = array(
'#type' => 'textfield',
'#title' => t('Node ID'),
'#default_value' => $analysis ? $analysis['#context']['inputs']['nid'] : '',
);
$form['input_url'] = array(
'#type' => 'textfield',
'#title' => t('URL'),
'#default_value' => $analysis ? $analysis['#context']['inputs']['url'] : '',
);
$form = array_merge($form, contentanalysis_analysis_form($form_state, $analysis, array(), 'admin'));
return $form;
}