Join Jon Peck for an in-depth discussion in this video Fleshing out a content type with fields, part of Drupal 7: Custom Module Development.
Before describing how to add custom fields, some background is needed. …Drupal 7 introduced an abstracted mechanism for handling data that made it possible to …share the same Application Programming Interface for managing data structures and how the data …structures relate. …This API is known as The Entity API. …At the highest level, an entity type is an abstract group of fields. …A field is a reusable data container holding primitive data types such as text, numbers, and so forth.…
An example of an entity type is a node, and nodes have both the title stored as text, …and a unique identifier the node ID stored as a number. …An entity is an instance of an entity type, and any given entity has the same fields. …For example, node ID number 12 has the title of Finn, and node ID number 28 is called Jake. …Both nodes have the same fields, title, and node ID, but the values can be different. …Entity types can be sub-classed as a bundle.…
A bundle is an entity type with a predefined collection of attached fields. …
- Creating your first module
- Interacting with hooks
- Working with permissions and roles
- Controlling access
- Adding a menu item to an admin interface
- Using the Form API (FAPI) to quickly create a form
- Creating custom form validation
- Manually creating a custom content type
- Validating user input
- Importing content using feeds
- Creating a block
- Understanding best practices and coding standards
Skill Level Advanced
Q: gmap3_tools is not working the way I expected it to. What version of gmap3_tools should I be using?
A: Use the free exercise file containing the version of gmap3_tools used for recording; the published version of the module on drupal.org has changed since recording and is not backwards compatible.
Q: I attempted to run the Drupal site root from the project files, but the site isn't loading. Why not?
A: The Drupal configuration file in sites/default/settings.php contains database configuration specific to the environment used to record the movie. This may be different than your environment. Edit the file and search for "windfarms" - you may need to change the database host, username, password, db name and port to match your specific environment.