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

Comments

jherencia’s picture

StatusFileSize
new1.17 KB
new1.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.
japerry’s picture

Status: Needs review » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.