while developing a MVC Component, I'm faced with the following problem: Before saving the posted data from the default.php, some data should be revised, if necessary. From what I know so far, the protected Function prepareTable(&$table) in the specific Model should cover my need. I started with a very simple approach, as follows:
protected function prepareTable(&$table){
$table=$this->getTable();
$table->image="HelloWorld";
}
My expectation is, that after submitting the template a specific field in my table has now the value "HelloWorld", but it isn't.
Perhaps, someone could give me an advice how to handle the prepareTable() function?
Thank you