public function ConfigSplitActivateForm::access in Configuration Split 2.0.x
Checks access for a specific request.
Parameters
\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'ConfigSplitActivateForm::access'
File
- src/
Form/ ConfigSplitActivateForm.php, line 145
Class
- ConfigSplitActivateForm
- The form for activating a split.
Namespace
Drupal\config_split\FormCode
public function access(AccountInterface $account) {
$split = $this
->getSplit();
return AccessResult::allowedIfHasPermission($account, 'administer configuration split')
->andIf(AccessResult::allowedIf(!$split
->get('status')))
->addCacheableDependency($split);
}