protected function IngredientAccessControlHandler::checkCreateAccess in Recipe 8.2
Separate from the checkAccess because the entity does not yet exist, it will be created during the 'add' process.
Overrides EntityAccessControlHandler::checkCreateAccess
File
- modules/
ingredient/ src/ IngredientAccessControlHandler.php, line 41
Class
- IngredientAccessControlHandler
- Access controller for ingredients.
Namespace
Drupal\ingredientCode
protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
return AccessResult::allowedIfHasPermission($account, 'add ingredient');
}