You are here

protected function PetAccessControlHandler::checkCreateAccess in Previewable email templates 8

Same name and namespace in other branches
  1. 8.4 src/PetAccessControlHandler.php \Drupal\pet\PetAccessControlHandler::checkCreateAccess()
  2. 8.3 src/PetAccessControlHandler.php \Drupal\pet\PetAccessControlHandler::checkCreateAccess()

Separate from the checkAccess because the entity does not yet exist, it will be created during the 'add' process.

Overrides EntityAccessControlHandler::checkCreateAccess

File

src/PetAccessControlHandler.php, line 38

Class

PetAccessControlHandler

Namespace

Drupal\pet

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
  return AccessResult::allowedIfHasPermission($account, 'add PET entity');
}