How does extending Mautic work?

This might be early - but we want to integrate Mautic with some of our clients’ marketing channels such as SMS.

We’d need to be able to extend the functionality (campaign execution via SMS, capture new types of events via the API from an external source - for example “opt-out” etc) - can this be done?



Any advice is much appreciated.



d.

This might be early - but we want to integrate Mautic with some of our clients’ marketing channels such as SMS.
We’d need to be able to extend the functionality (campaign execution via SMS, capture new types of events via the API from an external source - for example “opt-out” etc) - can this be done?

Any advice is much appreciated.

d.

Hi!

It can definitely be done but I’m afraid our developer documentation is a little lacking at the moment. Getting that written is on my todo list but trying to get the product itself wrapped up first :slight_smile:

Do you have experience with Symfony?

Thanks!
Alan

Hi, Alan!

Thank you for picking this up. Yes, we have some experience with Symphony. Any documentation you have would be great start rather than reverse engineering it :slight_smile: We’ve done complex WP plugins, hopefully some of that experience can be repurposed in Mautic. As soon as you have a preview of the documentation let me know, our team is eager to start asap.

d.

Real quick overview (more of a ramble?). We’re based on Symfony but have done some modifications to make it work “our way.” It’s pretty much a bundle structured extension. This may change in the future but for now if you’re familiar with Symfony bundles, you can probably get going pretty quick. Symfony documentation will be a great resource as we leverage Symfony’s controller, views, events, form component, routing etc.

Our bundles’s move away from Symfony’s bundle setup a bit. You’ll find the main bundles in app/bundles. Addons go in the root addon folder. Bundles in the addon directory should be namespace starting with “MauticAddon” (the autoloader will know that its in the addon directory). Instead of Symfony’s Resource folder structure, we’ve moved the config, views, etc directories out into the root of the bundle. So there’s Config, Views, and Translations. If you take a look at the recent github source, there’s now a single Config/config.php file where you can define the menu structure, routes, symfony services, and parameters. The addons/MauticChatBundle is a decent one to look for examples as it has routes, services, etc. For the menu setup, take a look at one of the Config/config.php in app/bundles/*Bundle.

We leverage events throughout that you can hook into to extend Mautic. You can take a look at each app/bundles/*Bundle/*Events.php to see what they are. Maybe if you give me an idea of what you need to extend, I can direct you to the right event?

After we get the next release out the door, I’ll try to get a more thorough developer doc written.

Thanks!
Alan

Hi, Alan - any updates on this? Moving in really heavy for one of our projects, I think this is the time to ask if a more complete doc is available.

HI Diggonomics

We got a good start on documentation and extending mautic started here:

http://mautic.github.io/developer-documentation/

It’s fairly complete for addon development. If you find any holes feel free to log them as issues here:

https://github.com/mautic/mautic/issues

And we’ll work on trying to add things.