Closed (outdated)
Project:
Machine name
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2012 at 09:26 UTC
Updated:
13 Dec 2025 at 17:14 UTC
Jump to comment: Most recent
Comments
Comment #1
eric.chenchao commentedThis is an awesome idea. Actually, we are using this in our very dependent code in our custom module. It will be great to become generic and view integrated function.
Comment #2
dwwIt's hard to make a generic API function for this because you need to do an EntityFieldQuery but you need to know the field name. The API as such would just be a thin wrapper around something that looks like this:
more or less. You'd have to pass in the 'field_machine_name' and 'node' parts to the API so that it knew what entity type and field name to use. Almost seems like more trouble than it's worth to make this an API function.
Comment #3
c-logemannPostponed until somebody provides a good solution.
Comment #4
c-logemannComment #5
c-logemannJust switch back to 7.x-1.x-dev branch because of new maintaining strategy.
Comment #6
c-logemannComment #7
danrodI'm closing this issue too given that Drupal 7 is no longer supported, if anyone needs this included in a potential D7 release, please contact me.
Comment #8
danrodComment #10
c-logemannSince D8+ it's so easy to realize just with the EntityTypeManager (etm). So it doesn't make sense to build an API inside this module.
Incomplete example, just to show a starting point: