As a developer i might need to initialize a object before it is used to render a form.
This would be possible to do by overriding the default 'newAction' like this:
MyController.php
/**
* @return void
*/
public function newAction() {
$entity = new SomeEnity();
... initialize entity ...
$this->view->assign('entity', $entity);
}
As a developer i need a way to do some stuff before saving the entity.
This would be possible by overriding the createAction like this:
MyController.php
/**
* @param object $entity
* @return void
*/
public function createAction($entity) {
... do some stuff with the entity ...
parent::createAction($entity);
}