function ContactMessageAccessControlHandler::checkCreateAccess

Same name in other branches
  1. 9 core/modules/contact/src/ContactMessageAccessControlHandler.php \Drupal\contact\ContactMessageAccessControlHandler::checkCreateAccess()
  2. 10 core/modules/contact/src/ContactMessageAccessControlHandler.php \Drupal\contact\ContactMessageAccessControlHandler::checkCreateAccess()
  3. 11.x core/modules/contact/src/ContactMessageAccessControlHandler.php \Drupal\contact\ContactMessageAccessControlHandler::checkCreateAccess()

Overrides EntityAccessControlHandler::checkCreateAccess

File

core/modules/contact/src/ContactMessageAccessControlHandler.php, line 19

Class

ContactMessageAccessControlHandler
Defines the access control handler for the message form entity type.

Namespace

Drupal\contact

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
    return AccessResult::allowedIfHasPermission($account, 'access site-wide contact form');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.