Follow-up from #1976158: Rename entity storage/list/form/render "controllers" to handlers.
Including:
- Base class and interface
- All subclasses
- Document references
- EntityManager methods,
- render => view_builder
- entity_render_controller() (not used anymore, should we drop it?)
- variable and property names
- Killed EntityTestRender and moved view_builder to EntityTest. No need for a separate entity type IMHO and we ended up with the same name for the entity type and the view builder when renaming it.
Comment | File | Size | Author |
---|---|---|---|
#29 | view-builder-2097903-29.patch | 104.03 KB | Berdir |
#29 | view-builder-2097903-29-interdiff.txt | 1.55 KB | Berdir |
#27 | view-builder-2097903-27.patch | 102.46 KB | amateescu |
#24 | view-builder-2097903-24.patch | 102.47 KB | Berdir |
#24 | view-builder-2097903-24-interdiff.txt | 1.04 KB | Berdir |
Comments
Comment #1
BerdirHere's the patch, let's see how good my search & replaces are.
Comment #3
joachim CreditAttribution: joachim commentedIsn't there a risk that 'view_builder' will be confused with Views? That's what I first thought of when I read the name...
Comment #4
Berdir@joachim: We discussed this issue for more than an hour. That point came up, but node_view(), user_view() and similar functions have existed since forever, so I don't think it's a problem.
Comment #6
BerdirJust a re-roll for now.
Comment #8
BerdirFixed the left-over merge conflict in that file.
Comment #10
BerdirAh, found it, nasty one. The derivate still looked for the render controller but that doesn't exist anymore to generate the entity row plugins, so they didn't exist anymore but node altered it and that resulted in an incomplete definition.
Let's see what the real remaining fails are.
Comment #12
BerdirComment #14
BerdirFixed a lot of tests, some pretty well hidden references to the render controller... Especially those that don't go through hasController() really should be updated. but for now, simple string replacements...
Comment #16
BerdirInnnteresting side effects of the entity_test changes. Will explain the changes in the next comment.
Comment #17
Berdirentity_test now has a uri on it's own, so we need to switch to one that doesn't.
entity_test already gets the field_test_text field by default so we don't need to create it, *but* it doesn't get the display configuration.
entity_test apparently also has the render cache enabled, entity_render_test did not?
This is consistent with the rdf implementation, only add the attributes if the field_test_text has a display component. Doesn't by default. One of the many problems in CommentNonNodeTest.
saving an entity_test entity now results in the entity render cache getting cleared, the process of that instantiates a view builder, which in turn loads the view modes of that entity type. They are defined in entity.module.
Comment #18
Berdir#16: view-builder-2097903-16.patch queued for re-testing.
Comment #20
BerdirRe-roll.
Comment #22
BerdirAnother re-roll and fixed a new call to getRenderController().
Comment #24
BerdirFixing that test.
Comment #25
amateescu CreditAttribution: amateescu commentedLooks good to me.
Comment #26
alexpottPatch no longer applies.
Comment #27
amateescu CreditAttribution: amateescu commentedRerolled.
Comment #28
alexpottentity_test_render is still used in \Drupal\entity_test\Plugin\Derivative\EntityTestLocalTasks and \Drupal\entity_test\Routing\RouteSubscriber - I think we need to remove this.
Comment #29
BerdirTrue, removed those two lines. The first one is from today I think and the other didn't cause any failures because the routes were defined but nothing used them.
Comment #30
amateescu CreditAttribution: amateescu commentedGrepped the codebase and there's no trace of entity_test_render anymore, so back to RTBC.
Comment #31
alexpottCommitted 4b7bbec and pushed to 8.x. Thanks!
Comment #32
BerdirUpdated https://drupal.org/node/1819308/revisions/view/2667818/2891523.
I guess we'll create a new change notice for changing controller to something else in the main issue. I also prepared https://drupal.org/developing/api/entity to document the view builder.
Comment #33
BerdirRemoving tags.