While working on panels-tabs I've implemented panels_tabs_panels_pane_content_alter(), where I need to get the $display (to get the the regions that should be themed as tabs).

As panels_tabs_panels_pane_content_alter() doesn't get the $display object itself, currently I need to use panels_load_display(), however panels_load_displays() doesn't statically cache the loaded $display, so I'm hammering the DB with those display loads.

So I think we have two options. Pass also the $display in the later hook, or statically cache the display. Which one do you think is better?

CommentFileSizeAuthor
#3 1230324-pass-panels-diaply-3.patch774 bytesamitaibu

Comments

Letharion’s picture

Assigned: Unassigned » merlinofchaos

Needs a reply from merlin :)

merlinofchaos’s picture

We can probably pass the display as an additional argument. That shouldn't break anything that exists. That should be an easy patch.

amitaibu’s picture

Status: Active » Needs review
StatusFileSize
new774 bytes

No API change with patch.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit f477c9a on 7.x-3.x, 7.x-3.x-i18n, 8.x-3.x by merlinofchaos:
    Issue #1230324 by Amitaibu: Pass $display to...