Architecture

Last updated on
26 January 2023

Each external entity type is its own entity type. This is achieved in a similar way as the ECK module does. Each external entity type is stored as a config entity from which Drupal entity types are created dynamically, see external_entities_entity_type_build().

External entity can be reached with \Drupal::entityTypeManager()->getStorage('movie')->load(123)Each external entity can be accessed through its own canonical path. For example, the "wikipedia_article" external entity with ID 123 can be viewed at "/wikipedia-article/123" (replace underscores with dashes). Each external entity also has its own listing page, for "wikpedia_article" that would be "/wikipedia-article".

Caching layer
Provided is a time-based caching for External Entities. How long an external entity may be cached can be configured through the interface. Custom cache expiration logic can be done through custom code.

Permissions
Each external entity type provides 4 permissions:

  • viewing
  • editing
  • deleting
  • viewing the automatically generated entity listing

For an introduction, see the Drupal Europe 2018 session How to COPE with External Entities by Adrian Bateman

Help improve this page

Page status: No known problems

You can: