Is there a function to get parent enityinfo to which entityreference field is attached. Similar function is hostEntity() provided by field_collection.
I created the content type which has enityform as enitityreference field.Enityform contains basic contact field with additional computed field. In that field I need nid of node to which entityform is attached.Using entity_metadata_wrapper I am able to get info about entityform object using below code.
$wrapper = entity_metadata_wrapper($entity_type, $entity); $info=$wrapper->entityInfo();
Any idea how to further backtrack and get parent node id?
Update : Entityform is attached to a node(ref).
1.Node contains entity reference field, to which enitity form is attached.
2.Enityform contains computed field.
3.In computed field when the above mentioned code executed, field $wrapper gets the details about enitityform object(should be because computed field belongs to this entity).
4.As there will be no relation between node and the attached entityfrom after submission, I am trying to capture the NID of node during the form submission.