Ejemplo n.º 1
0
 /**
  * 
  */
 public function developmentAction()
 {
     if ($this->getRequest()->isXMLHttpRequest()) {
         $this->_helper->layout()->disableLayout();
     }
     // Form Case Development
     $form = $this->_initForm('caseDevelopment');
     $data = array();
     $id = $this->_getParam('id');
     if (!empty($id)) {
         $row = $this->_mapper->fetchRow($id);
         $data = $row->toArray();
         $data['fk_id_action_plan'] = $id;
         if (!$this->view->caseActive()->hasAccessEdit()) {
             $form->getElement('save')->setAttrib('disabled', true);
         }
     }
     $form->populate($data);
     $this->view->id = $id;
     $this->view->case = $this->_mapper->detailCase($id);
     $this->view->form = $form;
 }
Ejemplo n.º 2
0
 /**
  *
  * @return string 
  */
 protected function getDirDocs()
 {
     $clientDir = $this->getClientDir();
     if (!empty($this->_data['case'])) {
         $clientDir .= $this->_ds . 'cases' . $this->_ds;
         if (!is_dir($clientDir)) {
             mkdir($clientDir);
         }
         $mapperCase = new Client_Model_Mapper_Case();
         $case = $mapperCase->fetchRow($this->_data['case']);
         $clientDir .= md5($case->fk_id_dec) . $this->_ds;
         if (!is_dir($clientDir)) {
             mkdir($clientDir);
         }
         $clientDir .= md5($this->_data['case']) . $this->_ds;
         if (!is_dir($clientDir)) {
             mkdir($clientDir);
         }
     } else {
         $clientDir .= $this->_ds . 'files' . $this->_ds;
         if (!is_dir($clientDir)) {
             mkdir($clientDir);
         }
     }
     return $clientDir;
 }
Ejemplo n.º 3
0
 /**
  *
  * @param type $idCase
  * @return \App_View_Helper_CaseActive 
  */
 public function setCase($idCase)
 {
     $mapperCase = new Client_Model_Mapper_Case();
     $this->_case = $mapperCase->fetchRow($idCase);
     return $this;
 }