Problem/Motivation
Follow-up to #2961822: Support object-based plugin definitions in ContextHandler.
As of that issue, object-based plugin definitions can implement ContextAwarePluginDefinitionInterface so that they can manage context definitions in a nice, object-oriented way. ContextAwarePluginBase also generally is able to take advantage of this neat new API.
However, there's a major hole in the implementation: the getContextDefinition() and getContextDefinitions() methods from ContextAwarePluginBase are still completely unaware of ContextAwarePluginDefinitionInterface, and therefore will blow up with a fatal error if the plugin definition is an object which implements that interface.
Proposed resolution
Fix ContextAwarePluginBase so that getContextDefinition() and getContextDefinitions() can handle object-based plugin definitions that implement ContextAwarePluginDefinitionInterface.
Remaining tasks
Write tests, review, commit.
User interface changes
None.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#13 | interdiff-2982626-7-13.txt | 566 bytes | phenaproxima |
#13 | 2982626-13.patch | 3.79 KB | phenaproxima |
#7 | 2982626-7.patch | 3.79 KB | phenaproxima |
#7 | 2982626-7-FAIL.patch | 1.9 KB | phenaproxima |
#2 | 2982626-context-2.patch | 1.89 KB | tim.plunkett |
Comments
Comment #2
tim.plunkettComment #3
phenaproximaLooks great but I think tests are needed here :)
Comment #5
phenaproximaComment #6
phenaproximaComment #7
phenaproximaAnd, a unit test!
Comment #8
phenaproximaReclassifying this as a bug report.
Comment #10
EclipseGc CreditAttribution: EclipseGc at Acquia commentedThis seems super reasonable and frankly about time for us to do this. RTBC.
Eclipse
Comment #11
Gábor HojtsyComment #12
Gábor HojtsyComment #13
phenaproximaFixed. Sending back to RTBC since it's a whitespace change.
Comment #14
phenaproximaThis now blocks #2976148: Layout-based entity rendering should delegate to the correct section storage instead of hardcoding to either defaults or overrides.
Comment #17
Gábor HojtsyCommitted, thanks! Looks good!