Assistance with my first plugin

Hi Community. My name is Giovanni Pugliese. I’m a Marketing Automation consultant whom comes from a developer background. I just recently got hired by a client whom is adopting Mautic and as a developer I’m quite excited to join the community. I come from working with other systems such as Eloqua, Marketo and Pardot, so hope to be able to share my knowledge of these systems and as a developer be a good contributor to the community. While I have years of .NET and PHP development experience, I had not yet done anything in Symfony. As of last week, I started the learning process ( going through their book, cookbook, online tutorials, etc. ). I’m working on creating a plugin to connect Mautic with Amazon SMS, so I used the existing SMS bundle as my starting point. I basically copied that bundle over the the plugin directory and started renaming namespaces and definitions to my new bundle. However, that was before understanding some basic registration requirements such as needing to have the object (bundle) registered in AppKernel.php. So, a couple of questions. First, when one starts developing a new custom bundle, do you do so in the Plugin directory, or in the app/bundles directory. Symfony documentation alludes to creating your own functionality in the /src directory ( which in Mautic I believe is app/bundles ), but I get the feeling in Mautic I’d be doing in in the plugins directory since Mautic describes the app/bundle directory as ‘core mautic stuff’. Not sure. Secondly, when you begin working on your own bundle, is the best way to begin is by using the app/console to generate the bundle (which would have registered the bundle in AppKerenl)? Specifically, is it incorrect to do what I did which is to copy an existing bundle ( since I wanted to reuse much of the functionality, just point it to another SMS provider )? Currently, I’m running into this issue when I try to clear the cache ( which I assume rebuilds the cache ):



img.png



I did a lot of reading over the weekend so I going to continue to debug, but any help and clarification on the above issues would be grealy appreciated. Thank you in advance for any assistance and I hope to repay the favor by being a contributor in the future.



Gio P.

Hi Community. My name is Giovanni Pugliese. I’m a Marketing Automation consultant whom comes from a developer background. I just recently got hired by a client whom is adopting Mautic and as a developer I’m quite excited to join the community. I come from working with other systems such as Eloqua, Marketo and Pardot, so hope to be able to share my knowledge of these systems and as a developer be a good contributor to the community. While I have years of .NET and PHP development experience, I had not yet done anything in Symfony. As of last week, I started the learning process ( going through their book, cookbook, online tutorials, etc. ). I’m working on creating a plugin to connect Mautic with Amazon SMS, so I used the existing SMS bundle as my starting point. I basically copied that bundle over the the plugin directory and started renaming namespaces and definitions to my new bundle. However, that was before understanding some basic registration requirements such as needing to have the object (bundle) registered in AppKernel.php. So, a couple of questions. First, when one starts developing a new custom bundle, do you do so in the Plugin directory, or in the app/bundles directory. Symfony documentation alludes to creating your own functionality in the /src directory ( which in Mautic I believe is app/bundles ), but I get the feeling in Mautic I’d be doing in in the plugins directory since Mautic describes the app/bundle directory as ‘core mautic stuff’. Not sure. Secondly, when you begin working on your own bundle, is the best way to begin is by using the app/console to generate the bundle (which would have registered the bundle in AppKerenl)? Specifically, is it incorrect to do what I did which is to copy an existing bundle ( since I wanted to reuse much of the functionality, just point it to another SMS provider )? Currently, I’m running into this issue when I try to clear the cache ( which I assume rebuilds the cache ):

I did a lot of reading over the weekend so I going to continue to debug, but any help and clarification on the above issues would be grealy appreciated. Thank you in advance for any assistance and I hope to repay the favor by being a contributor in the future.

Gio P.

You have two choices. One, extend original pługom with new SMS provider, which is in my opinion best choice. Second, create new one. This way you can copy existing pługin but will need to change the mame of the bundle

@atlasgp what is your skype login, do you have to add me?

@Carlos BR My skype name is the same, atlasgp. However I was able to finally push through this. Once I got a better handle in symfony ( which I’m by no way yet an expert ) I was able to better debug the issues. However, I wish I had seen this since I’d probably researched the SMS provider route. As it stands, I created a copy of the bundle and made the changes which I think actually worked out better since I got a better understanding on how things work. I’m getting it working for a client, but I want to polish it up a bit and share it with the community.

@atlasgp it would be great to see your plugin when you are ready to share it. I’m trying to write my own plugin right now with very limited success… My goal is to create a plugin that creates a campaign action that allows me to send post data to any URL. Any input you have would be great!