You are here

public static function WebformAccessResult::forbidden in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Access/WebformAccessResult.php \Drupal\webform\Access\WebformAccessResult::forbidden()

Creates an AccessResultInterface object with isForbidden() === TRUE.

Parameters

\Drupal\Core\Entity\EntityInterface|null $webform_entity: A webform or webform submission.

bool $cache_per_user: Cache per user.

Return value

\Drupal\Core\Access\AccessResultForbidden isForbidden() will be TRUE.

1 call to WebformAccessResult::forbidden()
WebformEntityAccessControlHandler::checkAccess in src/WebformEntityAccessControlHandler.php
Performs access checks.

File

src/Access/WebformAccessResult.php, line 73

Class

WebformAccessResult
Value object indicating an allowed access result, with cacheability metadata.

Namespace

Drupal\webform\Access

Code

public static function forbidden(EntityInterface $webform_entity = NULL, $cache_per_user = FALSE) {
  return static::addDependencies(AccessResult::forbidden(), $webform_entity, $cache_per_user);
}