You are here

class TestAccessClass in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\TestAccessClass
  2. 9 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 1038
Contains \Drupal\Tests\Core\Render\RendererTest.

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',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TestAccessClass::accessFalse public static function
TestAccessClass::accessResultAllowed public static function
TestAccessClass::accessResultForbidden public static function
TestAccessClass::accessTrue public static function
TestAccessClass::trustedCallbacks public static function Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface::trustedCallbacks
TrustedCallbackInterface::THROW_EXCEPTION constant Untrusted callbacks throw exceptions.
TrustedCallbackInterface::TRIGGER_SILENCED_DEPRECATION constant Untrusted callbacks trigger silenced E_USER_DEPRECATION errors.
TrustedCallbackInterface::TRIGGER_WARNING constant Untrusted callbacks trigger E_USER_WARNING errors.