You are here

public function SystemTestController::system_test_cache_tags_page in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php \Drupal\system_test\Controller\SystemTestController::system_test_cache_tags_page()

Set cache tag on on the returned render array.

1 string reference to 'SystemTestController::system_test_cache_tags_page'
system_test.routing.yml in core/modules/system/tests/modules/system_test/system_test.routing.yml
core/modules/system/tests/modules/system_test/system_test.routing.yml

File

core/modules/system/tests/modules/system_test/src/Controller/SystemTestController.php, line 213
Contains \Drupal\system_test\Controller\SystemTestController.

Class

SystemTestController
Controller routines for system_test routes.

Namespace

Drupal\system_test\Controller

Code

public function system_test_cache_tags_page() {
  $build['main'] = array(
    '#cache' => array(
      'tags' => array(
        'system_test_cache_tags_page',
      ),
    ),
    '#pre_render' => array(
      '\\Drupal\\system_test\\Controller\\SystemTestController::preRenderCacheTags',
    ),
    'message' => array(
      '#markup' => 'Cache tags page example',
    ),
  );
  return $build;
}