You are here

CacheTestController.php in Zircon Profile 8

File

core/modules/system/tests/modules/cache_test/src/Controller/CacheTestController.php
View source
<?php

/**
 * @file
 * Contains \Drupal\cache_test\Controller\CacheTestController.
 */
namespace Drupal\cache_test\Controller;

use Drupal\Core\Url;

/**
 * Controller routines for cache_test routes.
 */
class CacheTestController {

  /**
   * Early renders a URL to test bubbleable metadata bubbling.
   */
  public function urlBubbling() {
    $url = Url::fromRoute('<current>')
      ->setAbsolute();
    return [
      '#markup' => 'This URL is early-rendered: ' . $url
        ->toString() . '. Yet, its bubbleable metadata should be bubbled.',
    ];
  }

}

Classes

Namesort descending Description
CacheTestController Controller routines for cache_test routes.