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


PHP CRM_Dedupe_BAO_RuleGroup::getByType方法代碼示例

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

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

示例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();
 }
開發者ID:vakeesan26,項目名稱:civicrm-core,代碼行數:45,代碼來源:Registration.php

示例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);
 }
開發者ID:prashantgajare,項目名稱:civicrm-core,代碼行數:17,代碼來源:AJAX.php


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