Skip to content

Instantly share code, notes, and snippets.

@Leksat
Created July 3, 2015 14:31
Show Gist options
  • Save Leksat/815dcc153b4650b321ab to your computer and use it in GitHub Desktop.
Save Leksat/815dcc153b4650b321ab to your computer and use it in GitHub Desktop.
Drupal 8 custom entity type
Target: custom entity type, not config entity, nor content entity
# implementation 1:
- entity: EntityInterface
- storage: EntityStorageInterface
- query service:
- QueryFactoryInterface
- QueryInterface
- ConditionInterface
# implementation 2:
- entity: EntityInterface
- storage: KeyValueEntityStorage (existing)
- store: KeyValueStoreInterface (loads/saves; entities are arrays)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment