Clear entity type cached definitions when a model owner gets enabled after modeler api

Issue information

From user: jurgenhaas

Contribution record

Fork management

Problem/Motivation

When the model owner gets enabled after modeler API but the entity was already enabled before, e.g. for ECA when eca_ui gets enabled a while after, then the \Drupal\modeler_api\Hook\EntityHooks::entityTypeBuild is not invoked and that can cause exceptions, e.g. when going to the collection page where the list builder declaration is missing.

Proposed resolution

Implement a hook that clears the cached definitions so that they get rebuilt when needed.

Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information