本文整理汇总了PHP中CRM_Dedupe_BAO_RuleGroup::getByType方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Dedupe_BAO_RuleGroup::getByType方法的具体用法?PHP CRM_Dedupe_BAO_RuleGroup::getByType怎么用?PHP CRM_Dedupe_BAO_RuleGroup::getByType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Dedupe_BAO_RuleGroup
的用法示例。
在下文中一共展示了CRM_Dedupe_BAO_RuleGroup::getByType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildDedupeRules
public static function buildDedupeRules()
{
$parent = CRM_Utils_Request::retrieve('parentId', 'Positive', CRM_Core_DAO::$_nullObject);
switch ($parent) {
case 1:
$contactType = 'Individual';
break;
case 2:
$contactType = 'Household';
break;
case 4:
$contactType = 'Organization';
break;
}
$dedupeRules = CRM_Dedupe_BAO_RuleGroup::getByType($contactType);
CRM_Utils_JSON::output($dedupeRules);
}
示例2: buildDedupeRules
static function buildDedupeRules()
{
$parent = CRM_Utils_Array::value('parentId', $_POST);
switch ($parent) {
case 1:
$contactType = 'Individual';
break;
case 2:
$contactType = 'Household';
break;
case 4:
$contactType = 'Organization';
break;
}
$dedupeRules = CRM_Dedupe_BAO_RuleGroup::getByType($contactType);
echo json_encode($dedupeRules);
CRM_Utils_System::civiExit();
}
示例3: buildQuickForm
/**
* Build the form object.
*
* @return void
*/
public function buildQuickForm()
{
if ($this->_addProfileBottom) {
return self::buildMultipleProfileBottom($this, $this->_profileBottomNum);
}
if ($this->_addProfileBottomAdd) {
return self::buildMultipleProfileBottom($this, $this->_profileBottomNumAdd, 'additional_', ts('Profile for Additional Participants'));
}
$this->applyFilter('__ALL__', 'trim');
$attributes = CRM_Core_DAO::getAttribute('CRM_Event_DAO_Event');
$this->addElement('checkbox', 'is_online_registration', ts('Allow Online Registration'), NULL, array('onclick' => "return showHideByValue('is_online_registration'," . "''," . "'registration_blocks'," . "'block'," . "'radio'," . "false );"));
$this->add('text', 'registration_link_text', ts('Registration Link Text'));
if (!$this->_isTemplate) {
$this->addDateTime('registration_start_date', ts('Registration Start Date'), FALSE, array('formatType' => 'activityDateTime'));
$this->addDateTime('registration_end_date', ts('Registration End Date'), FALSE, array('formatType' => 'activityDateTime'));
}
$params = array('used' => 'Supervised', 'contact_type' => 'Individual');
$dedupeRuleFields = CRM_Dedupe_BAO_Rule::dedupeRuleFields($params);
foreach ($dedupeRuleFields as $key => $fields) {
$ruleFields[$key] = ucwords(str_replace('_', ' ', $fields));
}
$this->addElement('checkbox', 'is_multiple_registrations', ts('Register multiple participants?'));
$this->addElement('checkbox', 'allow_same_participant_emails', ts('Same email address?'));
$this->assign('ruleFields', json_encode($ruleFields));
$dedupeRules = array('' => '- Unsupervised rule -');
$dedupeRules += CRM_Dedupe_BAO_RuleGroup::getByType('Individual');
$this->add('select', 'dedupe_rule_group_id', ts('Duplicate matching rule'), $dedupeRules);
$participantStatuses = CRM_Event_PseudoConstant::participantStatus();
if (in_array('Awaiting approval', $participantStatuses) and in_array('Pending from approval', $participantStatuses) and in_array('Rejected', $participantStatuses)) {
$this->addElement('checkbox', 'requires_approval', ts('Require participant approval?'), NULL, array('onclick' => "return showHideByValue('requires_approval', '', 'id-approval-text', 'table-row', 'radio', false);"));
$this->add('textarea', 'approval_req_text', ts('Approval message'), $attributes['approval_req_text']);
}
$this->add('text', 'expiration_time', ts('Pending participant expiration (hours)'));
$this->addRule('expiration_time', ts('Please enter the number of hours (as an integer).'), 'integer');
self::buildRegistrationBlock($this);
self::buildConfirmationBlock($this);
self::buildMailBlock($this);
self::buildThankYouBlock($this);
parent::buildQuickForm();
}
示例4: buildDedupeRules
static function buildDedupeRules()
{
$parent = CRM_Utils_Array::value('parentId', $_REQUEST);
switch ($parent) {
case 1:
$contactType = 'Individual';
break;
case 2:
$contactType = 'Household';
break;
case 4:
$contactType = 'Organization';
break;
}
$dedupeRules = CRM_Dedupe_BAO_RuleGroup::getByType($contactType);
CRM_Utils_JSON::output($dedupeRules);
}