Example #1
0
 public function editAction()
 {
     $this->view->form = new Admin_Form_Album();
     $this->view->form->addID();
     if ($this->getRequest()->isPost()) {
         if ($this->view->form->isValid($this->getRequest()->getPost())) {
             Zwe_Model_Album::editAlbum($this->view->form->getValue('id'), $this->view->form->getValue('title'), $this->view->form->getValue('page'), $this->view->form->getValue('description'));
             $this->_helper->redirector('index');
         }
     }
     $Album = Zwe_Model_Album::getAlbumByID((int) $this->_getParam('album'));
     $this->view->form->populate($Album->toForm());
     $this->view->form->getElement('album')->setLabel('Edit the album');
 }