当前位置: 首页>>代码示例>>PHP>>正文


PHP ca_lists::getItemFromListForDisplayByItemValue方法代码示例

本文整理汇总了PHP中ca_lists::getItemFromListForDisplayByItemValue方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_lists::getItemFromListForDisplayByItemValue方法的具体用法?PHP ca_lists::getItemFromListForDisplayByItemValue怎么用?PHP ca_lists::getItemFromListForDisplayByItemValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ca_lists的用法示例。


在下文中一共展示了ca_lists::getItemFromListForDisplayByItemValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get


//.........这里部分代码省略.........
     }
     if (isset($pa_options["BINARY"]) && $pa_options["BINARY"]) {
         return $this->_FIELD_VALUES[$ps_field];
     }
     if (array_key_exists($ps_field, $this->FIELDS)) {
         $ps_field_type = $this->getFieldInfo($ps_field, "FIELD_TYPE");
         if ($this->getFieldInfo($ps_field, 'IS_LIFESPAN')) {
             $pa_options['isLifespan'] = true;
         }
         switch ($ps_field_type) {
             case FT_BIT:
                 $vs_prop = isset($this->_FIELD_VALUES[$ps_field]) ? $this->_FIELD_VALUES[$ps_field] : "";
                 if (isset($pa_options['convertCodesToDisplayText']) && $pa_options['convertCodesToDisplayText']) {
                     $vs_prop = (bool) $vs_prop ? _t('yes') : _t('no');
                 }
                 return $vs_prop;
                 break;
             case FT_TEXT:
             case FT_NUMBER:
             case FT_PASSWORD:
                 $vs_prop = isset($this->_FIELD_VALUES[$ps_field]) ? $this->_FIELD_VALUES[$ps_field] : null;
                 if (isset($pa_options["FILTER_HTML_SPECIAL_CHARS"]) && $pa_options["FILTER_HTML_SPECIAL_CHARS"]) {
                     $vs_prop = htmlentities(html_entity_decode($vs_prop));
                 }
                 //
                 // Convert foreign keys and choice list values to display text is needed
                 //
                 if (isset($pa_options['convertCodesToDisplayText']) && $pa_options['convertCodesToDisplayText'] && ($vs_list_code = $this->getFieldInfo($ps_field, "LIST_CODE"))) {
                     $t_list = new ca_lists();
                     $vs_prop = $t_list->getItemFromListForDisplayByItemID($vs_list_code, $vs_prop);
                 } else {
                     if (isset($pa_options['convertCodesToDisplayText']) && $pa_options['convertCodesToDisplayText'] && ($vs_list_code = $this->getFieldInfo($ps_field, "LIST"))) {
                         $t_list = new ca_lists();
                         if (!($vs_tmp = $t_list->getItemFromListForDisplayByItemValue($vs_list_code, $vs_prop))) {
                             if ($vs_tmp = $this->getChoiceListValue($ps_field, $vs_prop)) {
                                 $vs_prop = $vs_tmp;
                             }
                         } else {
                             $vs_prop = $vs_tmp;
                         }
                     } else {
                         if (isset($pa_options['convertCodesToDisplayText']) && $pa_options['convertCodesToDisplayText'] && $ps_field === 'locale_id' && (int) $vs_prop > 0) {
                             $t_locale = new ca_locales($vs_prop);
                             $vs_prop = $t_locale->getName();
                         } else {
                             if (isset($pa_options['convertCodesToDisplayText']) && $pa_options['convertCodesToDisplayText'] && is_array($va_list = $this->getFieldInfo($ps_field, "BOUNDS_CHOICE_LIST"))) {
                                 foreach ($va_list as $vs_option => $vs_value) {
                                     if ($vs_value == $vs_prop) {
                                         $vs_prop = $vs_option;
                                         break;
                                     }
                                 }
                             }
                         }
                     }
                 }
                 if (isset($pa_options["CONVERT_HTML_BREAKS"]) && $pa_options["CONVERT_HTML_BREAKS"] || isset($pa_options["convertLineBreaks"]) && $pa_options["convertLineBreaks"]) {
                     $vs_prop = caConvertLineBreaks($vs_prop);
                 }
                 break;
             case FT_DATETIME:
             case FT_TIMESTAMP:
             case FT_HISTORIC_DATETIME:
             case FT_HISTORIC_DATE:
             case FT_DATE:
                 $vn_timestamp = isset($this->_FIELD_VALUES[$ps_field]) ? $this->_FIELD_VALUES[$ps_field] : 0;
开发者ID:samrahman,项目名称:providence,代码行数:67,代码来源:BaseModel.php


注:本文中的ca_lists::getItemFromListForDisplayByItemValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。