I'm using entity_print for PDF generation on two node types. I'd like each to have its own orientation configuration (or just have one override the default). There is an event in entity_print where configuration can be set at run-time, so I have a simple event subscriber, with a method to override the orientation, but I can't seem to get the last piece, which is the entity (bundle label) to switch on.
How can an event subscriber have access to the entity type?
bundle()
method to return the type. Node also has the convienient methodgetType()
for node objects to get their node type.