class TestAccessClass

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\TestAccessClass

Hierarchy

Expanded class hierarchy of TestAccessClass

File

core/tests/Drupal/Tests/Core/Render/RendererTest.php, line 1041

Namespace

Drupal\Tests\Core\Render
View source
class TestAccessClass implements TrustedCallbackInterface {
  public static function accessTrue() {
    return TRUE;
  }
  public static function accessFalse() {
    return FALSE;
  }
  public static function accessResultAllowed() {
    return AccessResult::allowed();
  }
  public static function accessResultForbidden() {
    return AccessResult::forbidden();
  }
  
  /**
   * {@inheritdoc}
   */
  public static function trustedCallbacks() {
    return [
      'accessTrue',
      'accessFalse',
      'accessResultAllowed',
      'accessResultForbidden',
    ];
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.