Ejemplo n.º 1
0
 function getTreeDetails()
 {
     if (count(self::$treeDetails) > 0) {
         return self::$treeDetails;
     }
     $result = $this->pearDB->pquery('SELECT module FROM vtiger_trees_templates WHERE templateid = ?', [$this->getFieldParams()]);
     $module = $this->pearDB->getSingleValue($result);
     $moduleName = getTabModuleName($module);
     $result = $this->pearDB->pquery('SELECT tree,label FROM vtiger_trees_templates_data WHERE templateid = ?', [$this->getFieldParams()]);
     while ($row = $this->pearDB->fetch_array($result)) {
         self::$treeDetails[$row['tree']] = getTranslatedString($row['label'], $moduleName);
     }
     return self::$treeDetails;
 }
Ejemplo n.º 2
0
 private function getFieldTypeFromUIType()
 {
     // Cache all the information for futher re-use
     if (empty(self::$fieldTypeMapping)) {
         $result = $this->pearDB->pquery("select * from vtiger_ws_fieldtype", array());
         while ($resultrow = $this->pearDB->fetch_array($result)) {
             self::$fieldTypeMapping[$resultrow['uitype']] = $resultrow;
         }
     }
     if (isset(WebserviceField::$fieldTypeMapping[$this->getUIType()])) {
         if (WebserviceField::$fieldTypeMapping[$this->getUIType()] === false) {
             return null;
         }
         $row = WebserviceField::$fieldTypeMapping[$this->getUIType()];
         return $row['fieldtype'];
     } else {
         WebserviceField::$fieldTypeMapping[$this->getUIType()] = false;
         return null;
     }
 }