Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
civirules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Extensions
civirules
Commits
265b29b2
Commit
265b29b2
authored
9 years ago
by
jaapjansma
Browse files
Options
Downloads
Patches
Plain Diff
added pre and post hook on a rule object changed object name to match api name
parent
8feef0a5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Civirules/BAO/Rule.php
+6
-6
6 additions, 6 deletions
CRM/Civirules/BAO/Rule.php
with
6 additions
and
6 deletions
CRM/Civirules/BAO/Rule.php
+
6
−
6
View file @
265b29b2
...
...
@@ -50,10 +50,10 @@ class CRM_Civirules_BAO_Rule extends CRM_Civirules_DAO_Rule {
}
if
(
!
empty
(
$params
[
'id'
]))
{
CRM_Utils_Hook
::
pre
(
'edit'
,
'Rule'
,
$params
[
'id'
],
$params
);
CRM_Utils_Hook
::
pre
(
'edit'
,
'
CiviRule
Rule'
,
$params
[
'id'
],
$params
);
}
else
{
CRM_Utils_Hook
::
pre
(
'create'
,
'Rule'
,
NULL
,
$params
);
CRM_Utils_Hook
::
pre
(
'create'
,
'
CiviRule
Rule'
,
NULL
,
$params
);
}
$rule
=
new
CRM_Civirules_BAO_Rule
();
...
...
@@ -72,10 +72,10 @@ class CRM_Civirules_BAO_Rule extends CRM_Civirules_DAO_Rule {
self
::
storeValues
(
$rule
,
$result
);
if
(
!
empty
(
$params
[
'id'
]))
{
CRM_Utils_Hook
::
post
(
'edit'
,
'Rule'
,
$rule
->
id
,
$rule
);
CRM_Utils_Hook
::
post
(
'edit'
,
'
CiviRule
Rule'
,
$rule
->
id
,
$rule
);
}
else
{
CRM_Utils_Hook
::
post
(
'create'
,
'Rule'
,
$rule
->
id
,
$rule
);
CRM_Utils_Hook
::
post
(
'create'
,
'
CiviRule
Rule'
,
$rule
->
id
,
$rule
);
}
return
$result
;
...
...
@@ -94,7 +94,7 @@ class CRM_Civirules_BAO_Rule extends CRM_Civirules_DAO_Rule {
throw
new
Exception
(
'rule id can not be empty when attempting to delete a civirule rule'
);
}
CRM_Utils_Hook
::
pre
(
'delete'
,
'Rule'
,
$ruleId
,
CRM_Core_DAO
::
$_nullArray
);
CRM_Utils_Hook
::
pre
(
'delete'
,
'
CiviRule
Rule'
,
$ruleId
,
CRM_Core_DAO
::
$_nullArray
);
CRM_Civirules_BAO_RuleAction
::
deleteWithRuleId
(
$ruleId
);
CRM_Civirules_BAO_RuleCondition
::
deleteWithRuleId
(
$ruleId
);
...
...
@@ -102,7 +102,7 @@ class CRM_Civirules_BAO_Rule extends CRM_Civirules_DAO_Rule {
$rule
->
id
=
$ruleId
;
$rule
->
delete
();
CRM_Utils_Hook
::
post
(
'delete'
,
'Rule'
,
$ruleId
,
CRM_Core_DAO
::
$_nullArray
);
CRM_Utils_Hook
::
post
(
'delete'
,
'
CiviRule
Rule'
,
$ruleId
,
CRM_Core_DAO
::
$_nullArray
);
return
;
}
...
...
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