
Drupal 10 Development Cookbook
By :

In this recipe, we will create a configuration entity type called Announcement
. This will provide a configuration entity that allows you to create, edit, and delete messages that can be displayed on the site for important announcements.
Configuration entities do not interact with Drupal’s Field API and do not have a user interface to add fields. They have properties defined on their class like models in other frameworks. However, configuration entities do not have dedicated tables in the database. They are stored in the config
table as serialized data. The purpose of a configuration entity is for configuration. Examples of configuration entities are view displays, form displays, and contact forms.
src/Entity
directory in the module’s directory. This will translate to the \Drupal\mymodule\Entity
namespace and allow for entity type discovery:mkdir -p src/Entity