function views_test_data_views_post_build
Same name in other branches
- 9 core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc \views_test_data_views_post_build()
- 8.9.x core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc \views_test_data_views_post_build()
- 10 core/modules/views/tests/modules/views_test_data/views_test_data.views_execution.inc \views_test_data_views_post_build()
Implements hook_views_post_build().
File
-
core/
modules/ views/ tests/ modules/ views_test_data/ views_test_data.views_execution.inc, line 88
Code
function views_test_data_views_post_build(ViewExecutable $view) {
\Drupal::state()->set('views_hook_test_views_post_build', TRUE);
if (isset($view) && $view->storage
->id() == 'test_page_display') {
if ($view->current_display == 'page_1') {
$view->build_info['denied'] = TRUE;
}
elseif ($view->current_display == 'page_2') {
$view->build_info['fail'] = TRUE;
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.