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


PHP ca_lists::getItemFromListForDisplay方法代码示例

本文整理汇总了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);
}
开发者ID:kai-iak,项目名称:pawtucket2,代码行数:12,代码来源:listHelpers.php

示例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);
}
开发者ID:ffarago,项目名称:pawtucket2,代码行数:9,代码来源:listHelpers.php

示例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);
}
开发者ID:guaykuru,项目名称:pawtucket,代码行数:13,代码来源:listHelpers.php

示例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;
 }
开发者ID:idiscussforum,项目名称:providence,代码行数:44,代码来源:ModelService.php


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