Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
field system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2009 at 07:41 UTC
Updated:
4 Dec 2010 at 12:40 UTC
Spin off from #538164: Comment body as field
The 'X as field' trend creates a few fields like (node_)body, comment_body, block_body, etc., that only make sense to be 'shared' within a given entity type. Having comment_body show up in the UI for 'add existing field' will only clutter the 'list of existing field' selector and confuse people.
I think this calls for an (optional) $field['entity_types'] = array('comment') property, forbidding the creation of an instance on non-comment bundles (field_create_instance() raises an exception).
Comments
Comment #1
catchMakes sense to me.
Comment #2
sunDuplicate of #680910: Allow a given field to be restricted to some entity types - already fixed in HEAD.