You are here

public static function WebformEntityAccess::checkWebformSettingValue in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Access/WebformEntityAccess.php \Drupal\webform\Access\WebformEntityAccess::checkWebformSettingValue()

Check whether a webform setting is set to specified value.

Parameters

\Drupal\webform\WebformInterface $webform: A webform.

string $setting: A webform setting.

string $value: The setting value used to determine access.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

1 call to WebformEntityAccess::checkWebformSettingValue()
WebformNodeAccess::checkWebformSubmissionAccess in modules/webform_node/src/Access/WebformNodeAccess.php
Check whether the user can access a node's webform submission.
1 string reference to 'WebformEntityAccess::checkWebformSettingValue'
webform.routing.yml in ./webform.routing.yml
webform.routing.yml

File

src/Access/WebformEntityAccess.php, line 117

Class

WebformEntityAccess
Defines the custom access control handler for the webform entities.

Namespace

Drupal\webform\Access

Code

public static function checkWebformSettingValue(WebformInterface $webform = NULL, $setting = NULL, $value = NULL) {
  return AccessResult::allowedIf($webform
    ->getSetting($setting) === $value)
    ->addCacheableDependency($webform);
}