I wanted to alter the list of administrative links presented on the overview page for a particular entity [bundle], so I was happy to see it was alterable via hook_panelizer_overview_links_alter(). However, it looks as though the drupal_alter invocation is using an old syntax, so that only the first three of the seven parameters are passed through to alter hook implementations. I changed it as captured in the attached patch (passing the extra vars in an array), and it is working perfectly for me now. This looks like the right approach if I understand the drupal_alter documentation correctly (but feel free to correct me if I don't!).

Comments

ndewhurst’s picture

Title: Too many variables for drupal_alter » Too many parameters for drupal_alter
Assigned: ndewhurst » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.25 KB
ndewhurst’s picture

Issue summary: View changes
ndewhurst’s picture

Issue summary: View changes
damienmckenna’s picture

I had to confirm against the documentation, but yes, drupal_alter() only accepts two alterable arguments, thank you for pointing that out.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks!

  • DamienMcKenna committed c8fb90b on 7.x-3.x
    Issue #2289537 by ndewhurst: hook_panelizer_overview_links_alter() had...

Status: Fixed » Closed (fixed)

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