function views_ui_analysis in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 6.2 includes/analyze.inc \views_ui_analysis()
- 7.3 includes/analyze.inc \views_ui_analysis()
Format an analysis message.
This tool should be called by any module responding to the analyze hook to properly format the message. It is usually used in the form:
$ret[] = views_ui_analysis(t('This is the message'), 'ok');
The 'ok' status should be used to provide information about things that are acceptable. In general analysis isn't interested in 'ok' messages, but instead the 'warning', which is a category for items that may be broken unless the user knows what he or she is doing, and 'error' for items that are definitely broken are much more useful.
Parameters
$messages: The message to report.
$type: The type of message. This should be "ok", "warning" or "error". Other values can be used but how they are treated by the output routine is undefined.
3 calls to views_ui_analysis()
- node_views_analyze in modules/
node.views.inc - Implementation of hook_views_analyze().
- views_analyze_format_result in includes/
analyze.inc - Format the analyze result into a message string.
- views_ui_views_analyze in includes/
analyze.inc - Implementation of hook_views_analyze().
File
- includes/
analyze.inc, line 88 - Contains the view analyze tool code.
Code
function views_ui_analysis($message, $type = 'error') {
return array(
'message' => $message,
'type' => $type,
);
}