Autor tworzy akcje:
createform,
create,
edit,
update,
delete,
show
Zastanawia mnie po co potrzebne są akcje createform i edit,
Przecież można połączyć create z createform.
public function createAction() { $form = new $this->_form_class; if($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())){ $data = $form->getValues(); $DbTable = new $this->_db_table_class(); $id = $DbTable->createRow($data)->save(); return $this->_helper->redirector('index',$this->getRequest()->getControllerName(),$this->getRequest()->getModuleName()); } $this->view->form = $form; }
Domyslam sie, ze auto ksiązki jest madrzejszy ode mnie i zrobil to celowo, więc jakie ma zastosowanie tworzenie osobno create i createform?