Custom configuration entity type

If you remember NodeType from the previous chapter, you know the essentials of creating custom configuration entity types. So, let's create our Importer type now. Like before, we start with the annotation part, which this time is a ConfigEntityType:

namespace Drupal\products\Entity;use Drupal\Core\Config\Entity\ConfigEntityBase;/** * Defines the Importer entity. * * @ConfigEntityType( *   id = "importer", *   label = @Translation("Importer"), *   handlers = { *     "list_builder" = "Drupal\products\ImporterListBuilder", *     "form" = { *       "add" = "Drupal\products\Form\ImporterForm", *       "edit" = "Drupal\products\Form\ImporterForm", *       "delete" = "Drupal\products\Form\ImporterDeleteForm" *     }, *     "route_provider" = { * "html" ...

Get Drupal 8 Module Development - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.