public function deletepricesAction() { // action body $form = new Application_Form_DeletePrices(); $form->submit->setLabel('Удалить'); $form->cancel->setLabel('Отмена'); $this->view->form = $form; $id = $this->getParam('id'); $prices = new Application_Model_DbTable_Prices(); //если идет запрос POST if ($this->getRequest()->isPost()) { //если подтверждаем удаление if ($this->getRequest()->getPost('submit')) { $prices->deletePrice($id); $this->_helper->redirector('prices', 'setup'); } else { //если отменяем удаление if ($this->getRequest()->getPost('cancel')) { $this->_helper->redirector('prices', 'setup'); } } } }