Active
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Apr 2019 at 04:42 UTC
Updated:
30 Apr 2019 at 06:02 UTC
Jump to comment: Most recent
#2511548: Add a "context" array variable to all theme hooks and "#context" array property to all elements to provide optional contextual data introduced the "context" concept into the theme system, where this kind of metadata should actually live, not poluting the $variables array.
While the Drupal Core frontend BC policy states that variables can arbitrarily change, it would be nice to officially deprecate this and trigger a warning. To do this, we'll need a strong-typed Variables object (see #2972143: Create \Drupal\Component\Utility\ArrayObject) that can detect when this key is being accessed.
Deprecate the following $variables:
TBD
TBD, likely none
TBD
TBD, likely none
TBD
Comments
Comment #2
markhalliwell