A few questions relating to groups

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
capalex65
Registered User
Posts: 18
Joined: Sun Aug 16, 2015 3:08 am

A few questions relating to groups

Post by capalex65 »

Howdy!

So, I've got a few questions relating to groups, and more specifically, how to interact with them through an extension.

What I want to do is this: Add a column to the groups table, add a dropdown in the edit groups page (found the event for this already), and saving the data upon submit to the groups table like normal.

Therefore, my questions are as follows:

1) Can I add a column to the groups table with an extension migration file? (And how do I target this properly for adding and removal upon data deletion?)
2) Which event do I hook into to add the data to my dropdown in the editing page? (The data would come from another table in the db, created by my extension.)
3) Which event do I hook into to modify the saving of a group so it grabs the data from my dropdown?

Hope you guys can assist here, as I've been banging my head against the wall on this for the past few days.
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3738
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay
Contact:

Re: A few questions relating to groups

Post by Kailey »

capalex65 wrote: Tue Mar 12, 2019 5:33 pm 1) Can I add a column to the groups table with an extension migration file? (And how do I target this properly for adding and removal upon data deletion?)
https://github.com/kinerity/postcountre ... hp#L18-L26 and https://github.com/kinerity/postcountre ... hp#L33-L41
capalex65 wrote: Tue Mar 12, 2019 5:33 pm 2) Which event do I hook into to add the data to my dropdown in the editing page? (The data would come from another table in the db, created by my extension.)
The PHP event would be something along these lines: https://github.com/kinerity/postcountre ... #L107-L128
capalex65 wrote: Tue Mar 12, 2019 5:33 pm 3) Which event do I hook into to modify the saving of a group so it grabs the data from my dropdown?
See above.
Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules

If you have any questions about the rules/customs of this website, feel free to send me a PM.
My little corner of the world, where I sometimes post things documented from my job.
capalex65
Registered User
Posts: 18
Joined: Sun Aug 16, 2015 3:08 am

Re: A few questions relating to groups

Post by capalex65 »

You're a hero, that's exactly what I needed. Thanks! :D
Post Reply

Return to “Extension Writers Discussion”