本文整理汇总了PHP中CRMEntity::delete_related_module方法的典型用法代码示例。如果您正苦于以下问题:PHP CRMEntity::delete_related_module方法的具体用法?PHP CRMEntity::delete_related_module怎么用?PHP CRMEntity::delete_related_module使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRMEntity
的用法示例。
在下文中一共展示了CRMEntity::delete_related_module方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Here we override the parent's method
* This is done because the related lists for this module use a custom query
* that queries the child module's table (column of the uitype10 field)
*
* @see data/CRMEntity#delete_related_module($module, $crmid, $with_module, $with_crmid)
*/
function delete_related_module($module, $crmid, $with_module, $with_crmid)
{
if (!in_array($with_module, array('ProjectMilestone', 'ProjectTask'))) {
parent::delete_related_module($module, $crmid, $with_module, $with_crmid);
return;
}
$destinationModule = vtlib_purify($_REQUEST['destination_module']);
if (!is_array($with_crmid)) {
$with_crmid = array($with_crmid);
}
foreach ($with_crmid as $relcrmid) {
$child = CRMEntity::getInstance($destinationModule);
$child->retrieve_entity_info($relcrmid, $destinationModule);
$child->mode = 'edit';
$child->column_fields['projectid'] = '';
$child->save($destinationModule, $relcrmid);
}
}
示例2:
/**
* Handle deleting related module information.
* NOTE: This function has been added to CRMEntity (base class).
* You can override the behavior by re-defining it here.
*/
function delete_related_module($module, $crmid, $with_module, $with_crmid)
{
parent::delete_related_module($module, $crmid, $with_module, $with_crmid);
if ($with_module == 'HelpDesk') {
$this->updateServiceContractState($crmid);
}
}
示例3: array
function delete_related_module($module, $crmid, $with_module, $with_crmid)
{
global $log, $adb;
if ($with_module == 'Contacts') {
if (!is_array($with_crmid)) {
$with_crmid = array($with_crmid);
}
$data = array();
$data['sourceModule'] = $module;
$data['sourceRecordId'] = $crmid;
$data['destinationModule'] = $with_module;
foreach ($with_crmid as $relcrmid) {
$data['destinationRecordId'] = $relcrmid;
cbEventHandler::do_action('corebos.entity.link.delete', $data);
$adb->pquery('DELETE FROM vtiger_vendorcontactrel WHERE vendorid=? AND contactid=?', array($crmid, $relcrmid));
}
} else {
parent::delete_related_module($module, $crmid, $with_module, $with_crmid);
}
}