本文整理匯總了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;