SystemTestController.php 1.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
<?php

/**
 * @file
 * Contains \Drupal\system_test\Controller\SystemTestController.
 */

namespace Drupal\system_test\Controller;

use Drupal\Core\Controller\ControllerBase;

/**
 * Controller routines for system_test routes.
 */
class SystemTestController extends ControllerBase {

  /**
   * Tests main content fallback.
   *
   * @return string
   *   The text to display.
   */
  public function mainContentFallback() {
    return $this->t('Content to test main content fallback');
  }

  /**
   * @todo Remove system_test_lock_acquire().
   */
  public function lockAcquire() {
    return system_test_lock_acquire();
  }

  /**
   * @todo Remove system_test_lock_exit().
   */
  public function lockExit() {
    return system_test_lock_exit();
  }

41 42 43 44 45 46 47 48 49 50 51
  /**
   * Set cache tag on on the returned render array.
   */
  function system_test_cache_tags_page() {
    $build['main'] = array(
      '#markup' => 'Cache tags page example',
      '#cache' => array('tags' => array('system_test_cache_tags_page' => TRUE)),
    );
    return $build;
  }

52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
  /**
   * @todo Remove system_test_authorize_init_page().
   */
  public function authorizeInit($page_title) {
    return system_test_authorize_init_page($page_title);
  }

  /**
   * @todo Remove as part of https://drupal.org/node/1775842.
   */
  public function variableGet() {
    return variable_get('simpletest_bootstrap_variable_test');
  }

  /**
   * @todo Remove system_test_set_header().
   */
  public function setHeader() {
    return system_test_set_header();
  }

  /**
   * @todo Remove system_test_page_shutdown_functions().
   */
  public function shutdownFunctions($arg1, $arg2) {
    system_test_page_shutdown_functions($arg1, $arg2);
  }

}