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

Custom configuration entity type

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

namespace Drupal\products\Entity;use Drupal\Core\Config\Entity\ConfigEntityBase;use Drupal\Core\Url;/** * 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" ...

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