Represent Field API fields and instances.
The Field API defines two primary data structures, Field and Instance, and the concept of a Bundle. A Field defines a particular type of data that can be attached to objects. A Field Instance is a Field attached to a single Bundle. A Bundle is a set of fields that are treated as a group by the Field Attach API.
For example, suppose a site administrator wants Article nodes to have a subtitle and photo. Using the Field API or some UI module, the administrator creates a field named 'subtitle' of type 'text' and a field named 'photo' of type 'image'. The administrator (again, via a UI) creates two Field Instances, one attaching the field 'subtitle' to the bundle 'article' and one attaching the field 'photo' to the bundle 'article'. When the node system uses the Field Attach API to load all fields for an Article node, it passes the node's content type (which is 'article') as the node's bundle. field_attach_load() then loads the 'subtitle' and 'photo' fields because they are both attached to the bundle 'article'.
Field objects are (currently) represented as an array of key/value pairs. The object properties are:
modules/
Kommentare
Kommentar hinzufügen