This one feels like it should be obvious, but after some searching I'm having trouble finding a code example for checking whether a user has create access for an arbitrary entity.
In this case, I'm looking to pass an arbitrary entity type and bundle, in order to check whether a user has create access. This can be any entity type, including custom entities.
I have a sense that the end of the expression will be ->createAccess() , based on what I've read for the entity access interface classes, but where I'm stuck is finding the right class to call first, in order to get the entity information.