function insight_analyzer_info in Insight 7
8 calls to insight_analyzer_info()
- insight_admin_settings_form in ./
insight.admin.inc - @file Admin page callback for the insight module.
- insight_alert_active_operation in ./
insight.reports.inc - insight_contentanalysis_analysis_alter in ./
insight.module - insight_page_alerts in ./
insight.page_alerts.inc - Form builder: Builds the node administration overview.
- insight_page_report_pages in ./
insight.page_reports.inc - Form builder: Builds the node administration overview.
File
- ./
insight.module, line 862
Code
function insight_analyzer_info($with_meta = FALSE) {
$analyzers =& drupal_static(__FUNCTION__);
// Grab from cache or build the array.
if (!isset($analyzer)) {
if ($cache = cache_get("insight_analyzers") && !empty($cache->data)) {
$analyzers = $cache->data;
}
else {
//include_once drupal_get_path('module', 'insight') . '/insight.reports.inc';
$analyzers['#meta'] = array();
foreach (module_implements('insight_analyzer_info') as $module) {
foreach (module_invoke($module, 'insight_analyzer_info') as $name => $analyzer) {
// Ensure the current toolkit supports the element.
$analyzer['module'] = $module;
$analyzer['name'] = $name;
$analyzers[$name] = $analyzer;
$analyzers['#meta']['analyzers_by_type'][$analyzer['type']][] = $name;
if (isset($analyzer['contentanalyzer'])) {
$analyzers['#meta']['by_contentanalyzer'][$analyzer['contentanalyzer']] = $name;
}
if (isset($analyzer['reports'])) {
foreach ($analyzer['reports'] as $report_name => $report) {
$analyzers['#meta']['reports'][$report_name] = $report;
$analyzers['#meta']['reports_by_type'][$analyzer['type']][] = $report_name;
}
}
}
}
drupal_alter('insight_analyzer_info', $analyzers);
cache_set("insight_analyzers", $analyzers);
}
}
if (!$with_meta) {
unset($analyzers['#meta']);
}
return $analyzers;
}