public function ajaxPipelineConsignmentsDraftAction() { $this->_helper->layout->disableLayout(); $this->_helper->viewRenderer->setNoRender(TRUE); $start = 0; $end = $this->_request->getParam('counter', 10); $form = new Form_PipelineConsignments(); $form->addRows($start, $end); if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $pipeline_consignments = new Model_PipelineConsignments(); $pipeline_consignments->form_values = $form->getValues(); $pipeline_consignments->form_values['counter'] = $end; $result = $pipeline_consignments->addPipelineConsignmentsDraft(); if ($result) { echo 1; } else { echo 0; } } } }