当前位置: 首页>>代码示例>>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;未经允许,请勿转载。