本文整理汇总了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;