예제 #1
0
 function loadFromModelAction()
 {
     $config = App_Model_Config::loadXml('sdc');
     //print_r($modelconfig);
     foreach ($config->classes as $modelconfig) {
         foreach ($modelconfig->prop as $prop) {
             $key = $prop->name;
             $value = $prop->label;
             $ln = new Sys_Model_Translation();
             $ln->setKey($key);
             $ln->setEn($value);
             $ln->save();
         }
     }
     $this->render('blank', null, true);
 }
예제 #2
0
 function loadFromModelAction()
 {
     $config = App_Model_Config::loadXml('eau');
     //$package = arrar();
     foreach ($config->classes as $modelconfig) {
         foreach ($modelconfig->prop as $prop) {
             $key = $prop->name;
             $value = $prop->label;
             $ln = new Sys_Model_Translation();
             $ln->setKey($key);
             $ln->setEn($value);
             $ln->save();
         }
     }
     $this->_helper->redirector('index');
     $this->render('blank', null, true);
 }
예제 #3
0
 /**
  * get Singleton  Sys_Model_Translation
  *
  * @return Sys_Model_Translation
  */
 public static function getObjectByID($id)
 {
     $obj = new Sys_Model_Translation();
     $obj->find($id);
     return $obj;
 }