In the previous section we learned what a compound/bundled field is, and defined the module files that will wrap our field type plugin. In this section, we will create the file that defines the field type and which sub-fields compose it.
NameItem.php
The field file defines the structure of the field type. The name of the file (less the .php extension) will also be the name of the class defined within the file. The file should be placed in the path <my module>/src/Plugin/Field/FieldType.
In the previous section created the field type widget definition that will be used to format the field on the node form. In this section, we will create the file that defines the widget formatter used to pre-format the data before passing it on to a twig file.
Often a custom module will have configuration settings that can be provided by an administrator. Let's go step-by-step through the creation of a custom module, example, and its settings page.