public function LegalLanguageSettings::access in Legal 8
Same name and namespace in other branches
- 2.0.x src/Form/LegalLanguageSettings.php \Drupal\legal\Form\LegalLanguageSettings::access()
Access control callback.
Check that Locale module is enabled and user has access permission.
Parameters
\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.
1 string reference to 'LegalLanguageSettings::access'
File
- src/
Form/ LegalLanguageSettings.php, line 163
Class
- LegalLanguageSettings
- Class LegalLanguageSettings.
Namespace
Drupal\legal\FormCode
public function access(AccountInterface $account) {
// Check permissions and combine with any custom access checking needed.
// Pass forward parameters from the route and/or request as needed.
if (!\Drupal::moduleHandler()
->moduleExists('locale')) {
return AccessResult::forbidden();
}
return AccessResult::allowed();
}