Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
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
Development
CiviCRM Core
Commits
29d21638
Unverified
Commit
29d21638
authored
3 years ago
by
Seamus Lee
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #21572 from colemanw/afformEvents
Afform - Add getters/setters to the AfformSubmitEvent class
parents
7f452b35
80ff12c2
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
ext/afform/core/Civi/Afform/Event/AfformSubmitEvent.php
+27
-0
27 additions, 0 deletions
ext/afform/core/Civi/Afform/Event/AfformSubmitEvent.php
with
27 additions
and
0 deletions
ext/afform/core/Civi/Afform/Event/AfformSubmitEvent.php
+
27
−
0
View file @
29d21638
...
...
@@ -107,6 +107,33 @@ class AfformSubmitEvent extends AfformBaseEvent {
return
$this
;
}
/**
* Get the id of a saved record
* @param int $index
* @return mixed
*/
public
function
getEntityId
(
int
$index
=
0
)
{
$idField
=
CoreUtil
::
getIdFieldName
(
$this
->
entityName
);
return
$this
->
entityIds
[
$this
->
entityName
][
$index
][
$idField
]
??
NULL
;
}
/**
* Get records to be saved
* @return array
*/
public
function
getRecords
():
array
{
return
$this
->
records
;
}
/**
* @param array $records
* @return $this
*/
public
function
setRecords
(
array
$records
)
{
$this
->
records
=
$records
;
return
$this
;
}
/**
* @param int $index
* @param string $joinEntity
...
...
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