You are here

protected function BackgroundImageAccessControlHandler::checkCreateAccess in Background Image 8

Same name and namespace in other branches
  1. 2.x src/BackgroundImageAccessControlHandler.php \Drupal\background_image\BackgroundImageAccessControlHandler::checkCreateAccess()
  2. 2.0.x src/BackgroundImageAccessControlHandler.php \Drupal\background_image\BackgroundImageAccessControlHandler::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/BackgroundImageAccessControlHandler.php, line 51

Class

BackgroundImageAccessControlHandler
Access controller for the Background Image entity.

Namespace

Drupal\background_image

Code

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