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.

CommentFileSizeAuthor
#1 1810994-1-am.patch1.54 KBjherencia
#1 1810994-1.patch1.17 KBjherencia
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jherencia’s picture

FileSize
1.17 KB
1.54 KB
jherencia’s picture

Component: Code » Page Manager

DamienMcKenna queued 1: 1810994-1-am.patch for re-testing.

DamienMcKenna queued 1: 1810994-1.patch for re-testing.

Chris Matthews’s picture

Issue summary: View changes

The 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.

Checking patch includes/context-task-handler.inc...
Hunk #1 succeeded at 343 (offset 16 lines).
Applied patch includes/context-task-handler.inc cleanly.