Mautic Community Forums

Pulling info from the database

I would like to expand the Widgets and get info that isn’t currently being offered in the Dashboard.



However, I’m having a hard time figuring out which file(s) to edit to code with Mautic “standards.”

I can code with PHP/MySQL, but OOP PHP programming and Symfony are both very new to me.



For example, I have raw PHP code that has the data I need - where I do insert that and how can I find Mautic’s preferred method of querying the database (assuming it is a public function).

I would like to expand the Widgets and get info that isn’t currently being offered in the Dashboard.

However, I’m having a hard time figuring out which file(s) to edit to code with Mautic “standards.”
I can code with PHP/MySQL, but OOP PHP programming and Symfony are both very new to me.

For example, I have raw PHP code that has the data I need - where I do insert that and how can I find Mautic’s preferred method of querying the database (assuming it is a public function).

To extend my original post…

I’d love to contribute any improvements (once I get the hang of Mautic) to git. I realize modifying the core code will be overwritten upon the next update.

To summarize:
I want to modify /s/dashboard

I can do so easily by editing app/bundles/DashboardBundle/Views/Widget/detail.html.php and adding my raw code there. However, this is not in line with Mautic standards. Where may I determine the source of adding a currently nonexistent widget? (No, the info/function doesn’t presently exist in the Add Widget menu)

I’ve inspected app/bundles/DashboardBundle/Form/Type/WidgetType.php and ashamed to admit, not sure where to go next.

(Apologies for the obscenely newbish question)