本文整理汇总了PHP中CRM_Dedupe_BAO_Rule::find方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Dedupe_BAO_Rule::find方法的具体用法?PHP CRM_Dedupe_BAO_Rule::find怎么用?PHP CRM_Dedupe_BAO_Rule::find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Dedupe_BAO_Rule
的用法示例。
在下文中一共展示了CRM_Dedupe_BAO_Rule::find方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dedupeRuleFields
/**
* To find fields related to a rule group.
*
* @param array contains the rule group property to identify rule group
*
* @return rule fields array associated to rule group
* @access public
*/
static function dedupeRuleFields($params)
{
$rgBao = new CRM_Dedupe_BAO_RuleGroup();
$rgBao->level = $params['level'];
$rgBao->contact_type = $params['contact_type'];
$rgBao->is_default = 1;
$rgBao->find(TRUE);
$ruleBao = new CRM_Dedupe_BAO_Rule();
$ruleBao->dedupe_rule_group_id = $rgBao->id;
$ruleBao->find();
$ruleFields = array();
while ($ruleBao->fetch()) {
$ruleFields[] = $ruleBao->rule_field;
}
return $ruleFields;
}
示例2: dedupeRuleFieldsWeight
/**
* To find fields related to a rule group.
*
* @param array contains the rule group property to identify rule group
*
* @return (rule field => weight) array and threshold associated to rule group
* @access public
*/
function dedupeRuleFieldsWeight($params)
{
$rgBao = new CRM_Dedupe_BAO_RuleGroup();
$rgBao->level = $params['level'];
$rgBao->contact_type = $params['contact_type'];
$rgBao->is_default = 1;
$rgBao->find(TRUE);
$ruleBao = new CRM_Dedupe_BAO_Rule();
$ruleBao->dedupe_rule_group_id = $rgBao->id;
$ruleBao->find();
$ruleFields = array();
while ($ruleBao->fetch()) {
$ruleFields[$ruleBao->rule_field] = $ruleBao->rule_weight;
}
return array($ruleFields, $rgBao->threshold);
}
示例3: dedupeRuleFieldsWeight
/**
* find fields related to a rule group.
*
* @param array $params
*
* @return array
* (rule field => weight) array and threshold associated to rule group
*/
public static function dedupeRuleFieldsWeight($params)
{
$rgBao = new CRM_Dedupe_BAO_RuleGroup();
$rgBao->contact_type = $params['contact_type'];
if (!empty($params['id'])) {
// accept an ID if provided
$rgBao->id = $params['id'];
} else {
$rgBao->used = $params['used'];
}
$rgBao->find(TRUE);
$ruleBao = new CRM_Dedupe_BAO_Rule();
$ruleBao->dedupe_rule_group_id = $rgBao->id;
$ruleBao->find();
$ruleFields = array();
while ($ruleBao->fetch()) {
$ruleFields[$ruleBao->rule_field] = $ruleBao->rule_weight;
}
return array($ruleFields, $rgBao->threshold);
}
示例4: dedupeRuleFields
/**
* To find fields related to a rule group.
* @param array contains the rule group property to identify rule group
*
* @return rule fields array associated to rule group
* @access public
*/
function dedupeRuleFields($params)
{
require_once 'CRM/Dedupe/BAO/RuleGroup.php';
$rgBao = new CRM_Dedupe_BAO_RuleGroup();
$rgBao->level = $params['level'];
$rgBao->contact_type = $params['contact_type'];
$rgBao->is_default = 1;
$rgBao->find(true);
$ruleBao = new CRM_Dedupe_BAO_Rule();
$ruleBao->dedupe_rule_group_id = $rgBao->id;
$ruleBao->find();
$ruleFields = array();
while ($ruleBao->fetch()) {
$ruleFields[] = $ruleBao->rule_field;
}
return $ruleFields;
}