aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Group/Group.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Group/Group.php')
-rw-r--r--lib/private/Group/Group.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/Group/Group.php b/lib/private/Group/Group.php
index d3f8c603121..bb9a65de012 100644
--- a/lib/private/Group/Group.php
+++ b/lib/private/Group/Group.php
@@ -36,6 +36,7 @@ use OC\Hooks\PublicEmitter;
use OCP\Group\Backend\ICountDisabledInGroup;
use OCP\Group\Backend\IGetDisplayNameBackend;
use OCP\Group\Backend\IHideFromCollaborationBackend;
+use OCP\Group\Backend\INamedBackend;
use OCP\Group\Backend\ISetDisplayNameBackend;
use OCP\GroupInterface;
use OCP\IGroup;
@@ -318,6 +319,24 @@ class Group implements IGroup {
}
/**
+ * Get the names of the backend classes the group is connected to
+ *
+ * @return string[]
+ */
+ public function getBackendNames() {
+ $backends = [];
+ foreach ($this->backends as $backend) {
+ if ($backend instanceof INamedBackend) {
+ $backends[] = $backend->getBackendName();
+ } else {
+ $backends[] = get_class($backend);
+ }
+ }
+
+ return $backends;
+ }
+
+ /**
* delete the group
*
* @return bool