The Typed Data API, by example
There is a fantastic low-level API in Drupal called the Typed Data API. It is fantastic and provides a great way to handle data representation via a schema and validate that data’s values. The Typed Data API is the foundation for the Entity API. Entities are composed of fields that are composed of properties, and each step is tied into the Typed Data API.
The Typed Data API was created to provide developers with a consistent way of interacting with data differently.
The Typed Data API integrates with the Validator component from Symfony. This allows…