December 2016
Beginner to intermediate
1005 pages
21h 54m
English
Storage handlers control the loading, saving, and deleting of an entity. \Drupal\Core\Entity\ContentEntityType provides the base entity type definition for all content entity types. If it is not specified, then the default storage handler is \Drupal\Core\Entity\Sql\SqlContentEntityStorage. This class can be extended to implement alternative load methods or adjustments on save.
In this recipe, we will implement a method that supports loading an entity by a specific property instead of having to write a specific loadByProperties method call.
You will need a custom module to place the code into in order to implement a configuration entity type. Create an src directory for your PSR-4 style classes. A custom ...
Read now
Unlock full access