You are here

public function QuickForm::access in farmOS 2.x

Checks access for a specific quick form.

Parameters

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

string $id: The quick form ID.

Return value

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

File

modules/core/quick/src/Form/QuickForm.php, line 82

Class

QuickForm
Form that renders quick forms.

Namespace

Drupal\farm_quick\Form

Code

public function access(AccountInterface $account, string $id) {
  return $this->quickFormManager
    ->createInstance($id)
    ->access($account);
}