Enable / Disable action toggle for custom admin page?

Siropu

Well-known member
Hello everyone,

I'm working on a custom ads manager add-on for my community and so far so good. The only problem I'm having now, is that I can't figure out how XenForo actionToggle works. I've looked at the other internal XenForo Controllers that use enable /disable action toggle and used a similar code but it doesn't work.

I get the "Your changes have been saved." message but nothing happens.

What do I have to do to make actionToggle work? I really don't want to create my own method to get around this, so I hope someone can explain to me how can I make it work the "XenForo Way".

Thanks in advance.
 
Never mind, I figure it out... I found the method _getToggleResponse and made things clear. You just have to pass an itemID => ItemData array for the first argument. I was using the default result Array form fetchAll, that's why it didn't worked.

Anyway, I'm looking forward to finish this Add-on. :)
 
Back
Top Bottom