本文整理汇总了PHP中RequestUtil::getSpendingCategoryName方法的典型用法代码示例。如果您正苦于以下问题:PHP RequestUtil::getSpendingCategoryName方法的具体用法?PHP RequestUtil::getSpendingCategoryName怎么用?PHP RequestUtil::getSpendingCategoryName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RequestUtil
的用法示例。
在下文中一共展示了RequestUtil::getSpendingCategoryName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTitleByVendorType
/**
* Returns chart title for a prime or sub vendor page based on 'category'/'featured dashboard'/'domain'
* using values from current path.
*
* The page title above the visualization for Prime vendor Level and Sub vendor level pages:
*
* 1. Follow a three-line format when the M/WBE Category is equal to any of the following:
* Asian American, Black American, Women or Hispanic
* 2. Follow a two-line format when the M/WBE Category is equal to any of the following:
* Individual & Others or Non M/WBE
*
* @param string $domain
* @param string $defaultTitle
* @return string
*/
static function getTitleByVendorType($domain, $defaultTitle = 'Total Spending')
{
$title = $minority_category = $minority_type_id = '';
if (_checkbook_check_is_mwbe_page()) {
$minority_type_id = _getRequestParamValue('mwbe');
} else {
$lastReqParam = _getLastRequestParamValue();
foreach ($lastReqParam as $key => $value) {
switch ($key) {
case 'vendor':
$minority_type_id = self::getLatestMinorityTypeByVendorType($domain, $value, VendorType::$PRIME_VENDOR);
break;
case 'subvendor':
if ($value != 'all') {
$minority_type_id = self::getLatestMinorityTypeByVendorType($domain, $value, VendorType::$SUB_VENDOR);
}
break;
default:
}
}
}
$minority_type_ids = explode('~', $minority_type_id);
$minority_category = MappingUtil::getCurrenEhtnicityName($minority_type_ids);
$MWBE_certified = MappingUtil::isMWBECertified($minority_type_ids);
$title = $MWBE_certified ? '<p class="sub-chart-title">M/WBE Category: ' . $minority_category . '</p>' : $minority_category . ' ';
$title .= RequestUtil::getSpendingCategoryName($defaultTitle);
return html_entity_decode($title);
}