Closed (duplicate)
Project:
Entityreference unique
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Feb 2014 at 16:52 UTC
Updated:
25 Aug 2015 at 09:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pfrenssenComment #2
manuelBS commentedThanks for pointing this out. But I think we should better use the API to figure out the bundle, just as
$info = entity_get_info($entity_type);
if (empty($info['entity keys']['bundle'])) {
return $entity_type;
} else {
return $entity->{$info['entity keys']['bundle']};
}
What do you think? If you want, please update the patch and I will commit it.
Comment #3
pfrenssenSure! Here's an updated patch.
Comment #4
spadxiii commentedThe method is already passed an $instance of the field. Why retrieve it manually?
Comment #5
tessa bakkerTested SpadXIII's comment with success.
#2557039: Add i18n support for translation of labels will address this issue also with i18n support.