class TestAccessClass in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\TestAccessClass
Hierarchy
- class \Drupal\Tests\Core\Render\TestAccessClass implements TrustedCallbackInterface
Expanded class hierarchy of TestAccessClass
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ RendererTest.php, line 1035 - Contains \Drupal\Tests\Core\Render\RendererTest.
Namespace
Drupal\Tests\Core\RenderView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TestAccessClass:: |
public static | function | ||
TestAccessClass:: |
public static | function | ||
TestAccessClass:: |
public static | function | ||
TestAccessClass:: |
public static | function | ||
TestAccessClass:: |
public static | function |
Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface:: |
|
TrustedCallbackInterface:: |
constant | Untrusted callbacks throw exceptions. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger E_USER_WARNING errors. |