DrupalCon Baltimore 2017: Entities 201 - Creating Custom Entities

Drupal 8 contains a highly flexible and sophisticated structured data engine built into core - the Entity API. With the core tools available inside the Admin UI, it is possible to create and manage very robust and advanced sites. However, the Entity API can also be easily extended to create custom entities, and that is what we are going to do live in this session.

As we discussed last year in “Entities 101”, an entity is a “loadable thingy thats optionally fieldable”. While the concept is simple, the implementation can be intimidating. We are going to use freely available tools to make this process more accessible (and fast). By the end of the webinar, you will be able to create a basic custom entity and custom module in under 5 minutes.

Topics we will cover:

Code generation using Drupal Console
Creating a custom module to “house” the custom entity
Understanding basic object inheritance
Understanding folder naming and namespace
Permissions and routing
Fields and database storage
This process is also a great way to ease more into understanding OOP and Drupal development in general. The skills you learn here will enable you to dive into creating your own custom modules and code.

The scaffolding along with the great comments makes this a very friendly process, but this is a technical discussion about code. Attendees will be able to immediately apply what we are learning as we progress if they have a local development environment and Drupal console installed.

SLIDES: http://slides.com/ronnorthcutt/deck



MODULE: Download here

Drupal is a registered trademark of Dries Buytaert.