From 653628c8fb69dc3f9d26751520f91e43a18f17ae Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 20 Sep 2019 11:33:02 +0200 Subject: Allow to set the group display name in the database backend Signed-off-by: Joas Schilling --- .../Group/Backend/ISetDisplayNameBackend.php | 38 ++++++++++++++++++++++ lib/public/IGroup.php | 9 +++++ 2 files changed, 47 insertions(+) create mode 100644 lib/public/Group/Backend/ISetDisplayNameBackend.php (limited to 'lib/public') diff --git a/lib/public/Group/Backend/ISetDisplayNameBackend.php b/lib/public/Group/Backend/ISetDisplayNameBackend.php new file mode 100644 index 00000000000..f75be69438d --- /dev/null +++ b/lib/public/Group/Backend/ISetDisplayNameBackend.php @@ -0,0 +1,38 @@ + + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program 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 + * along with this program. If not, see . + * + */ + +namespace OCP\Group\Backend; + +/** + * @since 18.0.0 + */ +interface ISetDisplayNameBackend { + + /** + * @param string $gid + * @param string $displayName + * @return bool + * @since 18.0.0 + */ + public function setDisplayName(string $gid, string $displayName): bool; + +} diff --git a/lib/public/IGroup.php b/lib/public/IGroup.php index 48fa84df393..8b0eaf0ec0c 100644 --- a/lib/public/IGroup.php +++ b/lib/public/IGroup.php @@ -47,6 +47,15 @@ interface IGroup { */ public function getDisplayName(); + /** + * Set the group display name + * + * @param string $displayName + * @return bool + * @since 18.0.0 + */ + public function setDisplayName(string $displayName): bool; + /** * get all users in the group * -- cgit v1.2.3