Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm currently working on a filter module that replaces ctools task contexts keywords, but there is no easy way in ctools to retrieve the current task or the contexts it declares.
The patch I append exposes the contexts a task defines so other modules, like the one I'm developing, could use them.
I think this in D8 should be a common use case of the DIC already in core, but in D7 there is no other way than static/global variables to do this, so that's my aproach here.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1810994-1-am.patch | 1.54 KB | jherencia |
#1 | 1810994-1.patch | 1.17 KB | jherencia |
Comments
Comment #1
jherencia CreditAttribution: jherencia commentedComment #2
jherencia CreditAttribution: jherencia commentedComment #5
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 6 year old patch to context-task-handler.inc still applies cleanly the latest ctools 7.x-1.x-dev, but still needs to be officially reviewed and tested by the community.