function ViewsTestDataViewsHooks::viewsAnalyze
Same name and namespace in other branches
- 11.x core/modules/views/tests/modules/views_test_data/src/Hook/ViewsTestDataViewsHooks.php \Drupal\views_test_data\Hook\ViewsTestDataViewsHooks::viewsAnalyze()
Implements hook_views_analyze().
Attributes
#[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\HookCode
public function viewsAnalyze(ViewExecutable $view) : array {
\Drupal::state()->set('views_hook_test_views_analyze', TRUE);
$ret = [];
$ret[] = Analyzer::formatMessage('Test ok message', 'ok');
$ret[] = Analyzer::formatMessage('Test warning message', 'warning');
$ret[] = Analyzer::formatMessage('Test error message', 'error');
return $ret;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.