本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}