I want to override panelizer_access() function in custom module to give permission for users (group admin). I can achieve that by changing in that class (PanelizerEntityDefault.class.php) . I can override that function in other class in panelizer module eg. PanelizerEntityNode.class.php. http://drupal.org/files/ogpanelizer.patch .
But when I am doing this for my custom module, I can't do that, Don't know why because I am not good in OOPs. I tried as suggested in readme.txt . http://drupal.org/files/ogpanelizer.zip .
When I tried this code in my module file then I can extend that class, I create a object and call that function. Its calling (as I think) but not overriding panelizer function.
So please help me.
Thanks
Comments
Comment #1
ezra-g commentedI'm wondering if we can instead rely on node access in this case instead of overriding the callback, and simply piggyback on the group admin's ability to edit the group node.
Comment #2
azinck commented+1 on leveraging node access for this.
Comment #3
merlinofchaos commentedThe general problem here is that node_access doesn't allow you to add permission types. So for the node, Panelizer uses this:
So we do, in fact, leverage node_access now.
The problem comes in when you want someone to have panelizer access to something without being able to edit a specific entity. For that...I don't have a good solution. We might need to implement an alter hook of some flavor to make it work.