Problem/Motivation

A module that claims to expose the content model of any site cannot be limited to nodes and terms. On one of the sites this module runs on the products are commerce entities rather than nodes; other sites keep content in media, in profiles, in entity types of their own. The current base classes and helpers assume a node or a term in signatures, in loading, in alias handling and in language handling.

Proposed resolution

  • Type against ContentEntityInterface and the entity type manager throughout, rather than against node and term classes.
  • Take the bundle key, the label key and the alias source from the entity type definition instead of assuming type/title//node/{nid}.
  • Handle entity types that have no bundles and ones that have no canonical link template — both exist and both currently produce fatals or empty aliases.
  • Kernel coverage over at least four entity types: node, taxonomy term, media, and a custom one from the test module.

Remaining tasks

Everything. Blocks the scanner, which otherwise learns to scan only what the resources can serve.

Issue fork myrest-3618967

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 612ae6b0 on 1.0.x
    Issue #3618967: Read entity types from their definitions instead of...
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)