public function UncacheableTestAccessResult::isForbidden in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Access/AccessResultTest.php \Drupal\Tests\Core\Access\UncacheableTestAccessResult::isForbidden()
Checks whether this access result indicates access is explicitly forbidden.
This is a kill switch — both orIf() and andIf() will result in isForbidden() if either results are isForbidden().
Return value
bool When TRUE then isAllowed() and isNeutral() are FALSE.
Overrides AccessResultInterface::isForbidden
2 calls to UncacheableTestAccessResult::isForbidden()
- UncacheableTestAccessResult::andIf in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - Combine this access result with another using AND.
- UncacheableTestAccessResult::orIf in core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php - Combine this access result with another using OR.
File
- core/
tests/ Drupal/ Tests/ Core/ Access/ AccessResultTest.php, line 999 - Contains \Drupal\Tests\Core\Access\AccessResultTest.
Class
Namespace
Drupal\Tests\Core\AccessCode
public function isForbidden() {
return $this->value === 'FORBIDDEN';
}