You are here

function views_ui_views_analyze in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 views_ui/views_ui.module \views_ui_views_analyze()
  2. 6.3 includes/analyze.inc \views_ui_views_analyze()
  3. 7.3 includes/analyze.inc \views_ui_views_analyze()

Implementation of hook_views_analyze().

This is the basic views analysis that checks for very minimal problems. There are other analysis tools in core specific sections, such as node.views.inc as well.

File

includes/analyze.inc, line 99
Contains the view analyze tool code.

Code

function views_ui_views_analyze($view) {
  $ret = array();

  // Check for something other than the default display:
  if (count($view->display) < 2) {
    $ret[] = views_ui_analysis(t('This view has only a default display and therefore will not be placed anywhere on your site; perhaps you want to add a page or a block display.'), 'warning');
  }
  return $ret;
}