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

Add EntityContextDefinition for the 80% use case

$
0
0

Problem/Motivation

In TypedData land, you deal with DataDefinition objects:

DataDefinition::create('string');
EntityDataDefinition::create('node');

With ContextDefinitions, you don't have that luxury:

new ContextDefinition('string');
new ContextDefinition('entity:node');

With #2671964: ContextHandler cannot validate constraints, there is new entity-specific logic that should not be intermixed with the generic ContextDefinition class.

Proposed resolution

Deprecate using the constructor directly (is this possible?)
Add ::create()
Use EntityDataDefinition where possible
Remove all strpos() checks for 'entity:'

Remaining tasks

User interface changes

API changes

Data model changes


Viewing all articles
Browse latest Browse all 292538

Trending Articles



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