public function updateAction($id)
    {
        $this->initializeScaffolding();
        $this->checkRequest();

        try {
            $this->beforeRead();
            $this->view->record = $this->scaffolding->doRead($id);
            $this->afterRead();

            $this->beforeUpdate();
            $this->scaffolding->doUpdate($id, $this->request->getPost());
            $this->flash->success($this->successMessage);
            return $this->afterUpdate();
        } catch (Exception $e) {
            $this->flash->error($e->getMessage());
            $this->afterUpdateException();
        }

        return $this->dispatcher->forward(['action' => 'edit']);
    }
public function updateAction($id)
    {
        $this->initializeScaffolding();
        $this->checkRequest();

        try {
            $this->beforeRead();
            $this->view->record = $this->scaffolding->doRead($id);
            $this->afterRead();

            $this->beforeUpdate();
            $this->scaffolding->doUpdate($id, $this->request->getPost());
            $this->flash->success($this->successMessage);
            return $this->afterUpdate();
        } catch (Exception $e) {
            $this->flash->error($e->getMessage());
            $this->afterUpdateException();
        }

        return $this->dispatcher->forward(['action' => 'edit']);
    }
public function updateAction ( $ id ) { $ this -> initializeScaffolding ( ) ; $ this -> checkRequest ( ) ; try { $ this -> beforeRead ( ) ; $ this -> view -> record = $ this -> scaffolding -> doRead ( $ id ) ; $ this -> afterRead ( ) ; $ this -> beforeUpdate ( ) ; $ this -> scaffolding -> doUpdate ( $ id , $ this -> request -> getPost ( ) ) ; $ this -> flash -> success ( $ this -> successMessage ) ; return $ this -> afterUpdate ( ) ; } catch ( Exception $ e ) { $ this -> flash -> error ( $ e -> getMessage ( ) ) ; $ this -> afterUpdateException ( ) ; } return $ this -> dispatcher -> forward ( [ 'action' => 'edit' ] ) ; }
Updates existing record indicated by its ID

@ACL(name="update", inherit='edit')
@param $id
@return mixed
Updates existing record indicated by its ID