apps/activity/lib/FilesHooks.php
/**
	 * Unsharing a file or folder from a group
	 *
	 * @param IShare $share
	 * @throws \OCP\Files\NotFoundException
	 */
Unsharing a file or folder from a group
@param IShare $share
@throws \OCP\Files\NotFoundException
Unsharing a file or folder from a group @param IShare $share @throws \ OCP \ Files \ NotFoundException
protected function unshareFromGroup(IShare $share) {
		$group = $this->groupManager->get($share->getSharedWith());
		if (!($group instanceof IGroup)) {
			return;
		}
		$this->shareNotificationForSharer('unshared_group_self', $share->getSharedWith(), $share->getNodeId(), $share->getNodeType());
		if ($this->currentUser->getUID() !== null) {
			$this->shareNotificationForOriginalOwners($this->currentUser->getUID(), 'unshared_group_by', $share->getSharedWith(), $share->getNodeId(), $share->getNodeType());
		}
		$offset = 0;
		$users = $group->searchUsers('', self::USER_BATCH_SIZE, $offset);
		while (!empty($users)) {
			$this->addNotificationsForGroupUsers($users, 'unshared_by', $share->getNodeId(), $share->getNodeType(), $share->getTarget(), $share->getId());
			$offset += self::USER_BATCH_SIZE;
			$users = $group->searchUsers('', self::USER_BATCH_SIZE, $offset);
		}
	}
protected function unshareFromGroup ( IShare $ share ) { $ group = $ this -> groupManager -> get ( $ share -> getSharedWith ( ) ) ; if ( ! ( $ group instanceof IGroup ) ) { return ; } $ this -> shareNotificationForSharer ( 'unshared_group_self' , $ share -> getSharedWith ( ) , $ share -> getNodeId ( ) , $ share -> getNodeType ( ) ) ; if ( $ this -> currentUser -> getUID ( ) !== null ) { $ this -> shareNotificationForOriginalOwners ( $ this -> currentUser -> getUID ( ) , 'unshared_group_by' , $ share -> getSharedWith ( ) , $ share -> getNodeId ( ) , $ share -> getNodeType ( ) ) ; } $ offset = 0 ; $ users = $ group -> searchUsers ( '' , self :: USER_BATCH_SIZE , $ offset ) ; while ( ! empty ( $ users ) ) { $ this -> addNotificationsForGroupUsers ( $ users , 'unshared_by' , $ share -> getNodeId ( ) , $ share -> getNodeType ( ) , $ share -> getTarget ( ) , $ share -> getId ( ) ) ; $ offset += self :: USER_BATCH_SIZE ; $ users = $ group -> searchUsers ( '' , self :: USER_BATCH_SIZE , $ offset ) ; } }
Unsharing a file or folder from a group
 @param IShare $share
 @throws \OCP\Files\NotFoundException
Unsharing a file or folder from a group @param IShare $share @throws \ OCP \ Files \ NotFoundException
// Members of the new group // User performing the share