PacktLib: Programming Drupal 7 Entities

Programming Drupal 7 entities

Credits

About the Author

Acknowledgement

About the Reviewers

www.PacktPub.com

Preface

Understanding Entities

Introducing entities

Entity and solution modules

Introducing entity types, bundles, and fields

Powerful entity use cases

Our use case

Summary

Developing with Entity Metadata Wrappers

Introducing entity metadata wrappers

Creating an entity metadata wrapper object

Standard entity properties

Entity introspection

Using an entity metadata wrapper

Safely using text property values

Self-imposed limitation of entity programming

References

A note about EntityFieldQuery

Summary

Developing with Non-fieldable Entities

What are non-fieldable entities?

File entities

Vocabulary entities

Recipe site vocabularies

Summary

Developing with Fieldable Entities

What are fieldable entities?

Node entities

Comment entities

Term entities

Summary

Developing with Fields

Field types

Single-value and multi-value fields

Structure fields

Converting the recipe content type to use fields

Summary

Developing with Field Collections

Before Drupal 7

Creating a field collection field

Field collection entities

Adding a field collection to a node

Attaching a field collection to a content type

Summary

Expose Local Entities

Motivation for exposing entities

Fast track your data exposure

Allow fields on your entity

Give it multiple bundles

Administration interface and exportability

Summary

Expose Remote Entities

Introducing the Remote Entity API

Requirements for exposing remote entities

Implementing remote entity exposure

Running

Adding write support

Customization for your use case

Summary

Index