O'Reilly logo

Drupal 8 Module Development by Daniel Sipos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, we covered how to create custom fields that site builders (and developers) can add to entity types. This has implied defining three plugin types--FieldType, FieldWidget, and FieldFormatter, each with its own responsibility. The first defined the actual field and its storage and individual data properties, using the TypedData API. The second defined the form through which users can input field data when creating or editing entities that use the field. The third defined how the values inside this field can be displayed when viewing the entity.

We also saw that each of these plugins can have arbitrary sets of configurable settings that can be used to make the field dynamic--both in how the widget works and in how the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required