I'm building a custom content entity in Drupal 8 and so far done ok. I've used Drupal Console to generate a module and a bundle-less entity for me and added custom fields to this entity using the GUI. I can load the form to add entities of this type with the additional base fields I added in the ContentEntityType annotation.
My issue is that I cannot see the fields I have added through the GUI. If I XDebug my form, the fields are not added to the $form
array when parent::buildForm()
or parent::form()
are called.
I've looked at the Node module for help and in the NodeForm.php's form method, I can step through and see where the GUI-added fields are added when the form
method in the ContentEntityForm
class is called.
Having stepped through my entity's form building, I can see it also calls the form
method in the ContentEntityForm
class but my GUI fields are not added.
Is there something I'm missing in my custom entity to get the ContentEntityForm to add these?