You are here

public static function YamlFormUiAccess::checkYamlFormEditAccess in YAML Form 8

Check that form can be updated by a user.

Parameters

\Drupal\yamlform\YamlFormInterface $yamlform: A form.

\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.

Return value

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

1 string reference to 'YamlFormUiAccess::checkYamlFormEditAccess'
yamlform_ui.routing.yml in modules/yamlform_ui/yamlform_ui.routing.yml
modules/yamlform_ui/yamlform_ui.routing.yml

File

modules/yamlform_ui/src/Access/YamlFormUiAccess.php, line 56

Class

YamlFormUiAccess
Defines the custom access control handler for the form UI.

Namespace

Drupal\yamlform_ui\Access

Code

public static function checkYamlFormEditAccess(YamlFormInterface $yamlform, AccountInterface $account) {
  return AccessResult::allowedIf($yamlform
    ->access('update', $account));
}