Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Extensions
Group Administrators
Commits
7396f7c6
Commit
7396f7c6
authored
Jul 05, 2020
by
mattwire
Browse files
Use API4 for 5.24 support
parent
bc0d4036
Changes
1
Hide whitespace changes
Inline
Side-by-side
CRM/Groupadmin/Form/Edit.php
View file @
7396f7c6
...
...
@@ -21,6 +21,7 @@ class CRM_Groupadmin_Form_Edit extends CRM_Core_Form {
$this
->
assign
(
'groupTitle'
,
civicrm_api3
(
'Group'
,
'getvalue'
,
[
'id'
=>
$this
->
groupID
,
'return'
=>
'title'
]));
/* Join not supported until 5.27 - https://github.com/civicrm/civicrm-core/commit/16f5a13d62017fa30190a477b9f580b4eabd23a2
$groupAdminContacts = \Civi\Api4\GroupAdminContact::get()
->addSelect('contact_id', 'contact.display_name')
->setJoin([
...
...
@@ -29,6 +30,12 @@ class CRM_Groupadmin_Form_Edit extends CRM_Core_Form {
->addWhere('group_id', '=', $this->groupID)
->setCheckPermissions(FALSE)
->execute();
*/
$groupAdminContacts
=
civicrm_api3
(
'GroupAdminContact'
,
'get'
,
[
'return'
=>
[
'contact_id'
,
'contact.display_name'
],
'group_id'
=>
$this
->
groupID
,
])[
'values'
];
foreach
(
$groupAdminContacts
as
$groupAdminContact
)
{
$adminContacts
[
$groupAdminContact
[
'contact_id'
]]
=
$groupAdminContact
[
'contact.display_name'
];
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment