/** * Delete the campaign page. * * @param int $id * Campaign page id. * * @return; */ public static function deleteById($id) { CRM_Utils_Hook::pre('delete', 'Campaign', $id, CRM_Core_DAO::$_nullArray); $transaction = new CRM_Core_Transaction(); // delete from pcp table $pcp = new CRM_PCP_DAO_PCP(); $pcp->id = $id; $pcp->delete(); $transaction->commit(); CRM_Utils_Hook::post('delete', 'Campaign', $id, $pcp); }