I created a custom content entity with Drupal console version 1.9.2. Everything is working fine.

To use all the configuration and settings of my custom entity type in different bundles, I want additional modules that create bundles of my custom content entity.

I tried to execute drupal geb which creates configuration files within my custom module for a new node type (bundle of the node entity), but there is no option to create a bundle of my custom entity type.

Do you know how to generate boiler plate code for custom content entity bundles?

  • How did you generate your custom content entity? Did you specify --has-bundles=true? – Beebee Aug 29 at 15:18
  • > Did you specify --has-bundles=true? Yes, i did. – sgoelz Aug 29 at 15:19
  • I also installed the group module, which introdues the group entity and tried to create a new group type with drupal console. – sgoelz Aug 29 at 15:23
  • 1
    I just hand code most custom entities or copy/paste :) So I wasn't aware, but drupal geb looks like only generates node types, the command is either labelled bad or doesn't work? See generate:entity:bundle allow to add bundles to non-node entity types #3418 – Beebee Aug 29 at 15:30
  • 2
    Even when the issue is resolved this wouldn't generate more boilerplate code, because the boilerplate code is already generated by specifying --has-bundles=true. Then you can simply create bundles in UI (the boilerplate code includes the config forms) and export those bundles into the module config folder, see drupal.stackexchange.com/questions/283090/… – 4k4 Aug 29 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.