Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298718

Make it easy to get typed config representations of entities

$
0
0

Problem/Motivation

For both #2869792: Add constraints to all config entities and #2300677: [PP-1] Create/Update/Delete (POST/PATCH/DELETE) ConfigEntity via REST it would be helpful to get a typed config respresentation for a given entity.
Currently you'd need to call $typedConfigManager->get($name) , which is tricky as:

  • Getting the name from is different from config and config entity case
  • It doesn't actually work for config entities, which haven't been saved yet

Possible solutions:

  • Add a ->typedData() method to both ConfigBase and ConfigEntityBase
  • Add methods to TypedConfigManager to return what is needed

Proposed resolution

For now I went with the second solution as I'd like to separate the idea of typed data from runtime representations of configuration.

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 298718

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>