There are limited examples of how to work with entity fields.
In the context of core Drupal 7, this is an attempt to give more complete attention to:
1. Defining & Creating fields
2. Attaching them to an existing entity. in other words, defining and creating field instances.
3. Change their implementation in form & view contexts as part of different flows.

Test cases:
1. Usage in the user_profile_form vs user_registration form. I believe this is a reasonable contrast in which to demonstrate the expansion of an existing entity with fields.

Comments

Mile23’s picture

Status: Active » Postponed (maintainer needs more info)

There are two examples which create fields: field_example and field_permission_example.

There is an example of attaching fields to an entity in node_example. You can see it happen here: http://cgit.drupalcode.org/examples/tree/node_example/node_example.modul... Nodes (and users) are just another form of entity.

I'm not sure what you mean about 'flows.' In Field API you define widgets and formatters; you could define as many formatters for a field type as you wish, and then use different formatters for different display modes (such as Full vs. Teaser). This is demonstrated in both of the field examples... In field_example we present the same data with different widgets and formatters. In field_permission_example, we add a formatter for the existing text field.

As for the two user forms, that would be interesting to demo. Do you have a patch?

Mile23’s picture

Oops... Double post.

Mile23’s picture

Category: Task » Feature request
Issue tags: -entity field examples
Mile23’s picture

Assigned: arthrdnt » Unassigned

Generally unassigning issues. Please re-assign yourself as desired.

jungle’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

No activity for over 6 years. I am closing this. Please feel free to reopen if necessary.

Thanks!