當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CRM_Report_Utils_Report::getPreviewCriteriaQueryParams方法代碼示例

本文整理匯總了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));
 }
開發者ID:konadave,項目名稱:civicrm-core,代碼行數:22,代碼來源:Form.php

示例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;
 }
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:35,代碼來源:Form.php


注:本文中的CRM_Report_Utils_Report::getPreviewCriteriaQueryParams方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。