- Get the values from the form.
- Create an instance of the model.
- Populate and save model.
$modelPost = $formPost->getValuesAsModel('Blog_Model_Post');
I added a second convenience method to this, saveToModel(), which you pass the name of a model to. It fetches the model (using the getValuesAsModel method) and saves it.
No comments:
Post a Comment