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


PHP CRM_Core_BAO_CustomValue::deleteCustomValue方法代碼示例

本文整理匯總了PHP中CRM_Core_BAO_CustomValue::deleteCustomValue方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRM_Core_BAO_CustomValue::deleteCustomValue方法的具體用法?PHP CRM_Core_BAO_CustomValue::deleteCustomValue怎麽用?PHP CRM_Core_BAO_CustomValue::deleteCustomValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CRM_Core_BAO_CustomValue的用法示例。


在下文中一共展示了CRM_Core_BAO_CustomValue::deleteCustomValue方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: postProcess

 public function postProcess()
 {
     $config = CRM_Chapters_AutomatchConfig::singelton();
     if ($this->_action & CRM_Core_Action::DELETE) {
         CRM_Core_BAO_CustomValue::deleteCustomValue($this->id, $config->getCustomGroup('id'));
         $this->updateAllContacts();
         return;
     }
     $cg = 'custom_';
     $id = ':-1';
     if ($this->id) {
         $id = ':' . $this->id;
     }
     $data['entity_id'] = $this->contact_id;
     $data[$cg . $config->getMatchTypeField('id') . $id] = $this->_submitValues['type'];
     $data[$cg . $config->getCountryField('id') . $id] = $this->_submitValues['country'];
     $data[$cg . $config->getZipCodeRangeFromField('id') . $id] = $this->_submitValues['zipcode_from'];
     $data[$cg . $config->getZipCodeRangeToField('id') . $id] = $this->_submitValues['zipcode_to'];
     civicrm_api3('CustomValue', 'create', $data);
     $this->updateAllContacts();
 }
開發者ID:CiviCooP,項目名稱:net.emphanos.iida.chapters,代碼行數:21,代碼來源:AutomatchChapters.php

示例2: deleteCustomValue

 /**
  * Delete custom value.
  */
 public static function deleteCustomValue()
 {
     CRM_Utils_System::setHttpHeader('Content-Type', 'text/plain');
     $customValueID = CRM_Utils_Type::escape($_REQUEST['valueID'], 'Positive');
     $customGroupID = CRM_Utils_Type::escape($_REQUEST['groupID'], 'Positive');
     $contactId = CRM_Utils_Request::retrieve('contactId', 'Positive', CRM_Core_DAO::$_nullObject);
     CRM_Core_BAO_CustomValue::deleteCustomValue($customValueID, $customGroupID);
     if ($contactId) {
         echo CRM_Contact_BAO_Contact::getCountComponent('custom_' . $customGroupID, $contactId);
     }
     CRM_Contact_BAO_GroupContactCache::opportunisticCacheFlush();
     CRM_Utils_System::civiExit();
 }
開發者ID:kcristiano,項目名稱:civicrm-core,代碼行數:16,代碼來源:AJAX.php

示例3: deleteCustomValue

 /**
  * Function to delete custom value
  *
  */
 function deleteCustomValue(&$config)
 {
     $customValueID = CRM_Utils_Type::escape($_POST['valueID'], 'Positive');
     $customGroupID = CRM_Utils_Type::escape($_POST['groupID'], 'Positive');
     require_once "CRM/Core/BAO/CustomValue.php";
     CRM_Core_BAO_CustomValue::deleteCustomValue($customValueID, $customGroupID);
     if ($contactId = CRM_Utils_Array::value('contactId', $_POST)) {
         require_once 'CRM/Contact/BAO/Contact.php';
         echo CRM_Contact_BAO_Contact::getCountComponent('custom_' . $_POST['groupID'], $contactId);
     }
     // reset the group contact cache for this group
     require_once 'CRM/Contact/BAO/GroupContactCache.php';
     CRM_Contact_BAO_GroupContactCache::remove();
 }
開發者ID:ksecor,項目名稱:civicrm,代碼行數:18,代碼來源:AJAX.php

示例4: deleteCustomValue

 /**
  * Function to delete custom value
  *
  */
 static function deleteCustomValue()
 {
     $customValueID = CRM_Utils_Type::escape($_POST['valueID'], 'Positive');
     $customGroupID = CRM_Utils_Type::escape($_POST['groupID'], 'Positive');
     CRM_Core_BAO_CustomValue::deleteCustomValue($customValueID, $customGroupID);
     if ($contactId = CRM_Utils_Array::value('contactId', $_POST)) {
         echo CRM_Contact_BAO_Contact::getCountComponent('custom_' . $_POST['groupID'], $contactId);
     }
     // reset the group contact cache for this group
     CRM_Contact_BAO_GroupContactCache::remove();
     CRM_Utils_System::civiExit();
 }
開發者ID:peteainsworth,項目名稱:civicrm-4.2.9-drupal,代碼行數:16,代碼來源:AJAX.php

示例5: deleteCustomValue

 /**
  * Function to delete custom value
  *
  */
 static function deleteCustomValue()
 {
     header('Content-Type: text/plain');
     $customValueID = CRM_Utils_Type::escape($_REQUEST['valueID'], 'Positive');
     $customGroupID = CRM_Utils_Type::escape($_REQUEST['groupID'], 'Positive');
     $contactId = CRM_Utils_Request::retrieve('contactId', 'Positive', CRM_Core_DAO::$_nullObject);
     CRM_Core_BAO_CustomValue::deleteCustomValue($customValueID, $customGroupID);
     if ($contactId) {
         echo CRM_Contact_BAO_Contact::getCountComponent('custom_' . $customGroupID, $contactId);
     }
     // reset the group contact cache for this group
     CRM_Contact_BAO_GroupContactCache::remove();
     CRM_Utils_System::civiExit();
 }
開發者ID:TheCraftyCanvas,項目名稱:aegir-platforms,代碼行數:18,代碼來源:AJAX.php


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