本文整理匯總了PHP中ca_lists::getLabelForDisplay方法的典型用法代碼示例。如果您正苦於以下問題:PHP ca_lists::getLabelForDisplay方法的具體用法?PHP ca_lists::getLabelForDisplay怎麽用?PHP ca_lists::getLabelForDisplay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ca_lists
的用法示例。
在下文中一共展示了ca_lists::getLabelForDisplay方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getHierarchyName
/**
* Returns name of hierarchy for currently loaded item or, if specified, item with item_id = to optional $pn_id parameter
*/
public function getHierarchyName($pn_id = null)
{
if ($pn_id) {
$t_item = new ca_list_items($pn_id);
$vn_hierarchy_id = $t_item->get('list_id');
} else {
$vn_hierarchy_id = $this->get('list_id');
}
$t_list = new ca_lists($vn_hierarchy_id);
return $t_list->getLabelForDisplay(false);
}
示例2: join
if (is_array($va_list) && sizeof($va_list)) {
print $va_setting_info['label'] . " = " . join("; ", $va_list) . "<br/>\n";
}
break;
case 'relationship_type':
case 'restrict_to_relationship_types':
if (!is_array($vs_setting_value)) {
$vs_setting_value = array($vs_setting_value);
}
if (is_array($va_list = $t_rel->relationshipTypeListToTypeCodes($t_relationship->tableName(), $vs_setting_value)) && sizeof($va_list)) {
print $va_setting_info['label'] . " = " . join("; ", $va_list) . "<br/>\n";
}
break;
case 'list':
if ($t_list->load($vs_setting_value)) {
print $va_setting_info['label'] . " = " . $t_list->getLabelForDisplay() . " [" . $t_list->get('list_code') . "]<br/>\n";
}
break;
default:
if (is_array($vs_setting_value) && sizeof($vs_setting_value)) {
print $va_setting_info['label'] . " = " . join("; ", $vs_setting_value) . "<br/>\n";
} else {
if (strlen($vs_setting_value)) {
print $va_setting_info['label'] . " = " . $vs_setting_value . "<br/>\n";
}
}
break;
}
}
?>
</td>