本文整理汇总了PHP中CRM_Core_DAO_Note::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP CRM_Core_DAO_Note::delete方法的具体用法?PHP CRM_Core_DAO_Note::delete怎么用?PHP CRM_Core_DAO_Note::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CRM_Core_DAO_Note
的用法示例。
在下文中一共展示了CRM_Core_DAO_Note::delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteContact
/**
* Delete all records for this contact id.
*
* @param int $id
* ID of the contact for which note needs to be deleted.
*/
public static function deleteContact($id)
{
// need to delete for both entity_id
$dao = new CRM_Core_DAO_Note();
$dao->entity_table = 'civicrm_contact';
$dao->entity_id = $id;
$dao->delete();
// and the creator contact id
$dao = new CRM_Core_DAO_Note();
$dao->contact_id = $id;
$dao->delete();
}