function ViewsTestDataViewsHooks::viewsAnalyze

Implements hook_views_analyze().

File

core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php, line 46

Class

ViewsTestDataViewsHooks
Hook implementations for views_test_data.

Namespace

Drupal\views_test_data\Hook

Code

public function viewsAnalyze(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.