本文整理汇总了PHP中CRM_Report_Utils_Report::getPreviewCriteriaQueryParams方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Report_Utils_Report::getPreviewCriteriaQueryParams方法的具体用法?PHP CRM_Report_Utils_Report::getPreviewCriteriaQueryParams怎么用?PHP CRM_Report_Utils_Report::getPreviewCriteriaQueryParams使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Report_Utils_Report
的用法示例。
在下文中一共展示了CRM_Report_Utils_Report::getPreviewCriteriaQueryParams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addLinkToRow
/**
* Add link fields to the row.
*
* Function adds the _link & _hover fields to the row.
*
* @param array $row
* @param string $baseUrl
* @param string $linkText
* @param string $value
* @param string $fieldName
* @param string $tablePrefix
* @param string $fieldLabel
*
* @return mixed
*/
protected function addLinkToRow(&$row, $baseUrl, $linkText, $value, $fieldName, $tablePrefix, $fieldLabel)
{
$criteriaQueryParams = CRM_Report_Utils_Report::getPreviewCriteriaQueryParams($this->_defaults, $this->_params);
$url = CRM_Report_Utils_Report::getNextUrl($baseUrl, "reset=1&force=1&{$criteriaQueryParams}&" . $fieldName . "_op=in&{$fieldName}_value={$value}", $this->_absoluteUrl, $this->_id);
$row["{$tablePrefix}_{$fieldName}_link"] = $url;
$row["{$tablePrefix}_{$fieldName}_hover"] = ts("%1 for this %2.", array(1 => $linkText, 2 => $fieldLabel));
}
示例2: alterDisplayAddressFields
function alterDisplayAddressFields(&$row, &$rows, &$rowNum, $baseUrl, $urltxt)
{
$criteriaQueryParams = CRM_Report_Utils_Report::getPreviewCriteriaQueryParams($this->_defaults, $this->_params);
$entryFound = FALSE;
// handle country
if (array_key_exists('civicrm_address_country_id', $row)) {
if ($value = $row['civicrm_address_country_id']) {
$rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant::country($value, FALSE);
$url = CRM_Report_Utils_Report::getNextUrl($baseUrl, "reset=1&force=1&{$criteriaQueryParams}&" . "country_id_op=in&country_id_value={$value}", $this->_absoluteUrl, $this->_id);
$rows[$rowNum]['civicrm_address_country_id_link'] = $url;
$rows[$rowNum]['civicrm_address_country_id_hover'] = ts("%1 for this country.", array(1 => $urltxt));
}
$entryFound = TRUE;
}
if (array_key_exists('civicrm_address_county_id', $row)) {
if ($value = $row['civicrm_address_county_id']) {
$rows[$rowNum]['civicrm_address_county_id'] = CRM_Core_PseudoConstant::county($value, FALSE);
$url = CRM_Report_Utils_Report::getNextUrl($baseUrl, "reset=1&force=1&{$criteriaQueryParams}&" . "county_id_op=in&county_id_value={$value}", $this->_absoluteUrl, $this->_id);
$rows[$rowNum]['civicrm_address_county_id_link'] = $url;
$rows[$rowNum]['civicrm_address_county_id_hover'] = ts("%1 for this county.", array(1 => $urltxt));
}
$entryFound = TRUE;
}
// handle state province
if (array_key_exists('civicrm_address_state_province_id', $row)) {
if ($value = $row['civicrm_address_state_province_id']) {
$rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant::stateProvince($value, FALSE);
$url = CRM_Report_Utils_Report::getNextUrl($baseUrl, "reset=1&force=1&{$criteriaQueryParams}&state_province_id_op=in&state_province_id_value={$value}", $this->_absoluteUrl, $this->_id);
$rows[$rowNum]['civicrm_address_state_province_id_link'] = $url;
$rows[$rowNum]['civicrm_address_state_province_id_hover'] = ts("%1 for this state.", array(1 => $urltxt));
}
$entryFound = TRUE;
}
return $entryFound;
}