function contentanalysis_get_default_context in Content Analysis 8
Same name and namespace in other branches
- 6 contentanalysis.module \contentanalysis_get_default_context()
- 7 contentanalysis.module \contentanalysis_get_default_context()
Provides initial format for context associative array
Return value
Initialized context associative array
2 calls to contentanalysis_get_default_context()
- contentanalysis_analyze_js in ./
contentanalysis.module - Returns content analysis for AJAX calls
- contentanalysis_parse_context in ./
contentanalysis.module - Inspects context to select a normalizing context parser
File
- ./
contentanalysis.module, line 573
Code
function contentanalysis_get_default_context() {
$context = array(
'aid' => NULL,
// analysis id
'form_id' => NULL,
// id of form that submitted the content
'source' => NULL,
// source of request
'nid' => NULL,
// the Drupal node id
'path' => NULL,
// the Drupal path, after base_path, for a Drupal page
'url' => NULL,
// full url including http://
'page' => NULL,
// the contents of a page if a full page is to be analyzed, e.g. by using a URL to fetch a page
'title' => NULL,
// a drupal page title, e.g. a node title or header for other types of Drupal pages
'node_body' => NULL,
// content of the node body field
'body' => NULL,
// the main body of text to be analyzed. for a node it is the node body, plus title or any cck fields. For a page it is all content between the body tags
'body_notags' => NULL,
// the body field with all stripped of all HTML tags
'page_title' => NULL,
// the title found between the title tags in the header section of a HTMLdoc.
'meta_title' => NULL,
// the meta title found in the ehader section of a HTML doc
'meta_keywords' => NULL,
// the meta keywords found in the header section of a HTML doc.
'meta_description' => NULL,
// the meta keywords found in the header section of a HTML doc.
'analyzers' => array(),
);
return $context;
}