I've created a Magento plugin with a simple admin html observer:
This file looks like this:
//File: /Model/Adminhtml/Observer.php
class Aaa_Bbb_Model_Adminhtml_Observer
{
public function saveOrderData(Varien_Event_Observer $observer)
{
// example
$this->saveCustomOrderData();
}
public function saveCustomOrderData() {
// save data to a custom database table.
}
}
Now I've to create an adminhtml controller in the file /controllers/CustomOrderData.php. In this file I have to call the method saveCustomOrderData() in my Observer.php.
How can I call this method? Or is there a better place to store data in a custom table, from 2 files (the observer and controller method)?