You are here

public function WebformElementInterface::checkAccessRules in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElementInterface.php \Drupal\webform\Plugin\WebformElementInterface::checkAccessRules()

Check element access (rules).

Parameters

string $operation: The operation access should be checked for. Usually "create", "update", or "view".

array $element: An element.

\Drupal\Core\Session\AccountInterface $account: The user session for which to check access.

Return value

bool TRUE is the element can be accessed by the user.

Throws

|\Exception Throws exception when the webform entity has not been set for the element.

See also

\Drupal\webform\WebformAccessRulesManagerInterface::checkWebformAccess

1 method overrides WebformElementInterface::checkAccessRules()
WebformElementBase::checkAccessRules in src/Plugin/WebformElementBase.php
Check element access (rules).

File

src/Plugin/WebformElementInterface.php, line 377

Class

WebformElementInterface
Defines the interface for webform elements.

Namespace

Drupal\webform\Plugin

Code

public function checkAccessRules($operation, array $element, AccountInterface $account = NULL);