コード例 #1
0
ファイル: ChainController.php プロジェクト: josmel/HosPot
 public function indexAction()
 {
     $objCompany = new Default_Model_Company();
     $company = $objCompany->listCompanyJson();
     $this->addYosonVar('company', Zend_Json_Encoder::encode($company), false);
     $objUbigeo = new Default_Model_Ubigeo();
     $ubigeo = $objUbigeo->listStateJson();
     $this->addYosonVar('ubigeo', Zend_Json_Encoder::encode($ubigeo), false);
 }
コード例 #2
0
 public function indexAction()
 {
     $id = (int) $this->_getParam('id', 0);
     if (empty($id)) {
         $this->_redirect('/company');
     }
     $dataCompany = Default_Model_Company::getRow($id);
     if (!$dataCompany) {
         $this->_redirect('/company');
     }
     $this->view->name = $dataCompany['name'];
     $this->addYosonVar("idCompany", $id);
     $objUbigeo = new Default_Model_Ubigeo();
     $ubigeo = $objUbigeo->listStateJson();
     $this->addYosonVar('ubigeo', Zend_Json_Encoder::encode($ubigeo), false);
 }