本文整理汇总了PHP中ca_lists::getItemFromListForDisplay方法的典型用法代码示例。如果您正苦于以下问题:PHP ca_lists::getItemFromListForDisplay方法的具体用法?PHP ca_lists::getItemFromListForDisplay怎么用?PHP ca_lists::getItemFromListForDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca_lists
的用法示例。
在下文中一共展示了ca_lists::getItemFromListForDisplay方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: caGetListItemForDisplay
function caGetListItemForDisplay($ps_list_code, $ps_idno, $pb_return_plural = false, $pa_options = null)
{
global $g_list_item_label_cache;
if (isset($g_list_item_label_cache[$ps_list_code . '/' . $ps_idno . '/' . (int) $pb_return_plural])) {
return $g_list_item_label_cache[$ps_list_code . '/' . $ps_idno . '/' . (int) $pb_return_plural];
}
$t_list = new ca_lists();
if ($o_trans = caGetOption('transaction', $pa_options, null)) {
$t_list->setTransaction($o_trans);
}
return $g_list_item_label_cache[$ps_list_code . '/' . $ps_idno . '/' . (int) $pb_return_plural] = $t_list->getItemFromListForDisplay($ps_list_code, $ps_idno, $pb_return_plural);
}
示例2: caGetListItemForDisplay
function caGetListItemForDisplay($ps_list_code, $ps_idno, $pb_return_plural = false)
{
global $g_list_item_label_cache;
if (isset($g_list_item_label_cache[$ps_list_code . '/' . $ps_idno . '/' . (int) $pb_return_plural])) {
return $g_list_item_label_cache[$ps_list_code . '/' . $ps_idno . '/' . (int) $pb_return_plural];
}
$t_list = new ca_lists();
return $g_list_item_label_cache[$ps_list_code . '/' . $ps_idno . '/' . (int) $pb_return_plural] = $t_list->getItemFromListForDisplay($ps_list_code, $ps_idno, $pb_return_plural);
}
示例3: caGetListItemForDisplay
/**
* Fetch display label in current locale for item with specified idno in list
*
* @param string $ps_list_code List code
* @param string $ps_idno idno of item to get label for
* @param bool $pb_return_plural If true, return plural version of label. Default is to return singular version of label.
* @return string The label of the list item, or null if no matching item was found
*/
function caGetListItemForDisplay($ps_list_code, $ps_idno, $pb_return_plural = false)
{
$t_list = new ca_lists();
return $t_list->getItemFromListForDisplay($ps_list_code, $ps_idno, $pb_return_plural);
}
示例4: getModelInfoForType
private function getModelInfoForType($ps_type)
{
$t_instance = $this->_getTableInstance($this->getTableName());
$t_list = new ca_lists();
$va_return = array();
$vs_type_list_code = $t_instance->getTypeListCode();
// type info
$va_item = $t_list->getItemFromList($vs_type_list_code, $ps_type);
$va_return["type_info"] = $va_item;
$va_return["type_info"]["display_label"] = $t_list->getItemFromListForDisplay($vs_type_list_code, $ps_type);
// applicable element codes and related info
$va_elements = array();
$va_codes = $t_instance->getApplicableElementCodes($va_item["item_id"]);
$va_codes = array_flip($va_codes);
foreach ($va_codes as $vs_code => $va_junk) {
// subelements
$t_element = $t_instance->_getElementInstance($vs_code);
foreach ($t_element->getElementsInSet() as $va_element_in_set) {
if ($va_element_in_set["datatype"] == 0) {
continue;
}
// don't include sub-containers
$va_element_in_set["datatype"] = ca_metadata_elements::getAttributeNameForTypeCode($va_element_in_set["datatype"]);
$va_elements[$vs_code]["elements_in_set"][$va_element_in_set["element_code"]] = $va_element_in_set;
}
// element label and description
$va_label = $t_instance->getAttributeLabelAndDescription($vs_code);
$va_elements[$vs_code]["name"] = $va_label["name"];
if (isset($va_label["description"])) {
$va_elements[$vs_code]["description"] = $va_label["description"];
}
}
$va_return["elements"] = $va_elements;
// possible relationships with "valid tables" (i.e. those that are accessible via services)
$t_rel_types = new ca_relationship_types();
foreach ($this->opa_valid_tables as $vs_table) {
$vs_rel_table = $t_rel_types->getRelationshipTypeTable($this->getTableName(), $vs_table);
$va_info = $t_rel_types->getRelationshipInfo($vs_rel_table);
foreach ($va_info as $va_tmp) {
$va_return["relationship_types"][$vs_table][$va_tmp["type_code"]] = $va_tmp;
}
}
return $va_return;
}