function views_test_data_views_analyze

Same name and namespace in other branches
  1. 9 core/modules/views/tests/modules/views_test_data/views_test_data.views.inc \views_test_data_views_analyze()
  2. 8.9.x core/modules/views/tests/modules/views_test_data/views_test_data.views.inc \views_test_data_views_analyze()
  3. 10 core/modules/views/tests/modules/views_test_data/views_test_data.views.inc \views_test_data_views_analyze()

Implements hook_views_analyze().

File

core/modules/views/tests/modules/views_test_data/views_test_data.views.inc, line 40

Code

function views_test_data_views_analyze(ViewExecutable $view) {
    \Drupal::state()->set('views_hook_test_views_analyze', TRUE);
    $ret = [];
    $ret[] = Analyzer::formatMessage(t('Test ok message'), 'ok');
    $ret[] = Analyzer::formatMessage(t('Test warning message'), 'warning');
    $ret[] = Analyzer::formatMessage(t('Test error message'), 'error');
    return $ret;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.