Closed (fixed)
Project:
Entity Print
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2017 at 02:39 UTC
Updated:
30 Mar 2017 at 07:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
sumanthkumarc commented@benjy, Any progress on this?
Comment #3
benjy commentedHere's a first pass.
Comment #5
benjy commentedFixed a couple of tests and changed to the same approach for the main module.
Comment #6
mglaman+1 I think this looks great compared to services, and for ease of integrating in other contrib (#2857785: Add a print entity handler)
Comment #7
sam152 commentedLooking good. Comments as follows.
You can use \Drupal\Core\Entity\EntityTypeInterface::entityClassImplements here.
I prefer the concrete ContentEntityRenderer::class syntax for this too.
If you have a dependency on views, this is probably not needed.
Most implementations I've seen of this pass $entity_type as the first param and store it on a property. Not sure if that might be useful down the track.
technically this is the entity_type_manager. Also no camels for local variables.
Comment #8
benjy commentedThanks for the review. All fixed apart from the entityType param.
Comment #10
benjy commentedComment #13
benjy commentedCommitted.