Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Entity CRUD controller
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Jun 2013 at 23:13 UTC
Updated:
25 Apr 2014 at 12:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
steven.wichers commentedAnd here's a patch so you have the entity that contains the field collection. Useful if you need to change the view mode based on settings of that entity.Don't use this patch. See comment 2.
Comment #2
steven.wichers commentedI just found out that you can get the host entity from the field collection entity by using hostEntity().
This means the second patch provides redundant functionality. The major difference being an explicit definition of the host entity instead of relying on someone to be aware that it's accessible via the existing entity wrapper. Just a heads up to anyone who is planning on using on of the patches. The first is enough.
Comment #3
rrrob commentedI have tested the original patch and it works great for me.
Comment #4
rrrob commentedComment #5
fagoMakes sense. But as rendering field collection item entities is implemented via the entity api controller, I think the fix should go in there. Thus moving.
Comment #6
fagoI've implemented this generically and committed it - thus all entities based on the EntityAPIController will receive the hook as well then.
Comment #8
johnheaven commentedEDIT - just realised I made a big mistake! This is a diff of my whole development environment with loads of test code in there, not just the affected folder. So don't use it!
I tried this patch, but had to apply it manually. I tried rerolling it - hope it's ok as I haven't rerolled a patch before ... it looks quite long, hope I haven't done it wrong! But it works for me.
Comment #9
johnheaven commented