Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
justinfreeman (Agileware)
Core
Commits
28abbcb0
Commit
28abbcb0
authored
11 years ago
by
eileen
Browse files
Options
Downloads
Patches
Plain Diff
CRM-7964 add BAO classes so that eval removals can call BAO not DAO
parent
f63cb77f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Member/BAO/MembershipBlock.php
+44
-2
44 additions, 2 deletions
CRM/Member/BAO/MembershipBlock.php
CRM/Member/BAO/MembershipPayment.php
+83
-0
83 additions, 0 deletions
CRM/Member/BAO/MembershipPayment.php
with
127 additions
and
2 deletions
CRM/Member/BAO/MembershipBlock.php
+
44
−
2
View file @
28abbcb0
...
...
@@ -33,5 +33,47 @@
*
*/
class
CRM_Member_BAO_MembershipBlock
extends
CRM_Member_DAO_MembershipBlock
{
// placeholder required because there's some magic code which assumes that BAOs exist
}
\ No newline at end of file
/**
* class constructor
*/
function
__construct
()
{
parent
::
__construct
();
}
/**
* function to add the membership Blocks
*
* @param array $params reference array contains the values submitted by the form
*
* @access public
* @static
*
* @return object
*/
static
function
create
(
&
$params
)
{
$hook
=
empty
(
$params
[
'id'
])
?
'create'
:
'edit'
;
CRM_Utils_Hook
::
pre
(
$hook
,
'MembershipBlock'
,
CRM_Utils_Array
::
value
(
'id'
,
$params
),
$params
);
$dao
=
new
CRM_Member_DAO_MembershipBlock
();
$dao
->
copyValues
(
$params
);
$dao
->
id
=
CRM_Utils_Array
::
value
(
'id'
,
$params
);
CRM_Utils_Hook
::
post
(
$hook
,
'MembershipBlock'
,
$dao
->
id
,
$dao
);
return
$dao
;
}
/**
* Function to delete membership Blocks
*
* @param int $id
* @static
*/
static
function
del
(
$id
)
{
$dao
=
new
CRM_Member_DAO_MembershipType
();
$dao
->
id
=
$id
;
$result
=
FALSE
;
if
(
$dao
->
find
(
TRUE
))
{
$dao
->
delete
();
$result
=
TRUE
;
}
return
$result
;
}
}
This diff is collapsed.
Click to expand it.
CRM/Member/BAO/MembershipPayment.php
0 → 100644
+
83
−
0
View file @
28abbcb0
<?php
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.3 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| CiviCRM is free software; you can copy, modify, and distribute it |
| under the terms of the GNU Affero General Public License |
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
| |
| CiviCRM is distributed in the hope that it will be useful, but |
| WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| See the GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public |
| License and the CiviCRM Licensing Exception along |
| with this program; if not, contact CiviCRM LLC |
| at info[AT]civicrm[DOT]org. If you have questions about the |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2013
* $Id$
*
*/
class
CRM_Member_BAO_MembershipPayment
extends
CRM_Member_DAO_MembershipPayment
{
/**
* class constructor
*/
function
__construct
()
{
parent
::
__construct
();
}
/**
* function to add the membership Payments
*
* @param array $params reference array contains the values submitted by the form
*
* @access public
* @static
*
* @return object
*/
static
function
create
(
&
$params
)
{
$hook
=
empty
(
$params
[
'id'
])
?
'create'
:
'edit'
;
CRM_Utils_Hook
::
pre
(
$hook
,
'MembershipPayment'
,
CRM_Utils_Array
::
value
(
'id'
,
$params
),
$params
);
$dao
=
new
CRM_Member_DAO_MembershipPayment
();
$dao
->
copyValues
(
$params
);
$dao
->
id
=
CRM_Utils_Array
::
value
(
'id'
,
$params
);
CRM_Utils_Hook
::
post
(
$hook
,
'MembershipPayment'
,
$dao
->
id
,
$dao
);
return
$dao
;
}
/**
* Function to delete membership Payments
*
* @param int $id
* @static
*/
static
function
del
(
$id
)
{
$dao
=
new
CRM_Member_DAO_MembershipPayment
();
$dao
->
id
=
$id
;
$result
=
FALSE
;
if
(
$dao
->
find
(
TRUE
))
{
$dao
->
delete
();
$result
=
TRUE
;
}
return
$result
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment