/** * add a title from "Add item" link in the matter view page * titles are added to classifier table as main classifiers * * */ public function addTitleAction() { $this->_helper->layout->disableLayout(); $matterModel = new Application_Model_Matter(); if ($this->getRequest()->isPost()) { $this->_helper->viewRenderer->setNoRender(); $post_data = $this->getRequest()->getPost(); if (!$post_data['matter_ID'] || !$post_data['type_code']) { echo "false"; return; } $matterModel = new Application_Model_Matter(); $result = $matterModel->addClassifier($post_data); echo $result; } else { $cat_code = $this->_getParam('cat_code'); $this->view->classifier_types = $matterModel->getMainClassifierTypes($cat_code); } }