DCFFM17 - Ekes: Custom Entities - it's easier than you think

Not everything really wants to be shoehorned into a new content type or vocabulary. Not everything even wants to be content, it may be configuration that can be controlled with config management. Creating custom entities allows you to make a more logical data model. They give you much more direct flexibility without having to make alterations to routes, forms, events... Your code becomes collected together more logically, and easier for others to read.

Building custom entities is also a great way to learn your way round the Entity API. As you are inheriting classes, you really don't need to know it all before you start. Better still: there are tools to do all the basics for you. If you knew creating entities in Drupal 7, this is a completely different, and much much easier, world.

​This session will: Introduce you to creating custom entities and why you might want to create them; Point out some common additional features you may need to implement for them; Showing practical examples we'll look, and possibly introduce you to, parts of the Entity API that you can use for customised functionality. There will be code, there will be annotations, so some understanding of PHP is helpful here, however the steps on the way will be explained.

https://2017.drupalcamp-frankfurt.de/de/node/182

https://www.drupal.org/u/ekes

Drupal is a registered trademark of Dries Buytaert.