Hello
My plugin add support of entities into page manager.
Just add Entity panes content type and select the build mode to make it work.
Please review.
Hello
My plugin add support of entities into page manager.
Just add Entity panes content type and select the build mode to make it work.
Please review.
Comments
Comment #1
fagothanks, here a review:
hm, that doesn't say whether it'S the form or whatever. Maybe we should say "entity view", "entity display" or so? How is that called for nodeS?
hoo, from where comes that value? Magic!?
It's more saving the form values, not?
Does ctools require this block stuff?
Minor, but it's the entity type name.
Comment #2
bennetteson commentedTks for your review,
Here a patch with a little more comments.
I updated the patch to match somes of yours reviews.
Comment #3
amitaibuMinor stuff:
We probably need to str_replace ('_', '-', $conf['view_mode'])
Should be Implements ...
Comment #4
bennetteson commentedYou're right. Thanks for your review.
Here a new path.
Review welcome.
Comment #5
fagobuild mode? It's view mode. Then, it's no proper sentence.
We are not referring the the Entity module, so Entity should be lowercase.
Why content_type_content_type? I guess one should be entity_type. And why do we have that ugly entity_entity prefixes?
display should be lower case, double spacing behind name.
again.
Then @see does not follow the coding style. Needs an empty line before it and no color or tailing point.
again @see coding style.
Let's use the directory 'ctools/content_types'.
Comment #6
bennetteson commentedThanks for your review.
Done.
Move to content_type_info.
If you don't want the ugly entity_entity prefixe, I can move the plugin manchine name form entity_display to display.
Done.
Done.
Done.
Done.
Please review.
Comment #7
fago>If you don't want the ugly entity_entity prefixe, I can move the plugin manchine name form entity_display to display.
oh, I see the entity_entity namespace comes from entity_display being again prefixed by ctools... In that case, let's keep it that way. Patch visually looks good, just needs a positive test report..
Comment #8
fagook, tested it. When I clicked on preview in page-manager/panels I got this:
Warning: array_flip(): Can only flip STRING and INTEGER values! in EntityAPIController->load() (line 184 of ..../drupal-7/sites/all/modules/entity/includes/entity.controller.inc).
EntityMalformedException: Missing bundle property on entity of type profile2. in entity_extract_ids() (line 7410 of ..../drupal-7/includes/common.inc).
I tested it with profile2. Then in the UI the plugins are listed below "Entity display", although there is already a "Profile2" category for the fields. So what about adding in to the "Profile2" category and call it "Entity display" there? I think people what look for something like that there.
I'm not sure yet about the "entity display" working. Sry about coming back to this again, but we need to come up with unified wording for that once, so we can start using it everywhere.
Options:
"Entity view" -> unspecific, unclear whether it's a view?
"Entity display"
"Entity" -> It should be clear it's rendered, not?
"Rendered entity"
I tend to "Entity" (rendered using view mode "foo"). In code it should be "entity_view" I guess as that's the name of the function already.
Comment #9
fagoComment #10
fagoamateescu: fago: I vote for "Rendered entity", it's consistent with what's currently in file_entity.module
Damz told me "entity reference" also uses "Rendered entity".
So let's just follow that and use "Rendered $entity-type", e.g. "Rendered profile" and "entity_view" as plugin machine name.
Comment #11
bennetteson commentedHi fago,
Can you give me the list of used module and version ? I will try to reproduce the bug.
Comment #12
fagoI've used the latest dev version of profile2.
Comment #13
andypostProbably depends on #1229320: Entity context: Impossible to load entities with non-numeric IDs
Comment #14
bennetteson commentedThe bug seem to not came from my patch.
I not succeed to reproduce your bug.
Here the others corrections are here.
Comment #15
bennetteson commentedComment #16
BenjaminRH commented#14: ctools_plugins_content_types_entity_display.patch queued for re-testing.
Comment #17
fagothanks, I've polished some comments and improved the title/categorization of the plugins and committed it.
Comment #19
raulmuroc commentedPatch from #14 doesn't apply to 7.x-1.x-dev version of 28-FEB-2012. It should apply, shouldn't it?
And if I download the last 7.x-1.x-dev and upload it to my websites, it just break them down.
Comment #21
raulmuroc commentedSo we must interpret that patch has been included in last stable version of ctools?
Comment #23
OnkelTem commented#1742680: Add support of entity titles in ctools page manager