public function editAction() { $this->view->form = new Admin_Form_News(); $this->view->form->addID(); if ($this->getRequest()->isPost()) { if ($this->view->form->isValid($this->getRequest()->getPost())) { Zwe_Model_News::editNews($this->view->form->getValue('id'), $this->view->form->getValue('title'), $this->view->form->getValue('page'), $this->view->form->getValue('text')); $this->_helper->redirector('index'); } } $News = Zwe_Model_News::getNewsByID((int) $this->_getParam('news')); $this->view->form->populate($News->toForm()); $this->view->form->getElement('news')->setLabel('Edit the news'); }