Documentation

SeedDMS_Core_Group
in package

Class to represent a user group in the document management system

Tags
category

DMS

author

Markus Westphal, Malcolm Cowe, Uwe Steinmann uwe@steinmann.cx

copyright

Copyright (C) 2002-2005 Markus Westphal, 2006-2008 Malcolm Cowe, 2010-2024 Uwe Steinmann

version

Release: @package_version@

Table of Contents

Properties

$_comment  : string
The comment of the user group
$_dms  : SeedDMS_Core_DMS
Back reference to DMS this user group belongs to
$_id  : int
The id of the user group
$_name  : string
The name of the user group
$_users  : array<string|int, SeedDMS_Core_User>

Methods

__construct()  : mixed
__toString()  : string
Cast to string
addUser()  : bool
Add user as member
getAllInstances()  : array<string|int, SeedDMS_Core_Group>|bool
Get all groups
getApprovalStatus()  : mixed
getComment()  : string
Return comment of group
getDMS()  : SeedDMS_Core_DMS
getID()  : int
Return internal id of group
getInstance()  : SeedDMS_Core_Group|bool
Return an instance of a group object
getManagers()  : array<string|int, SeedDMS_Core_User>|bool
Get all users which are managers of the group
getName()  : string
Return name of group
getNotifications()  : array<string|int, SeedDMS_Core_Notification>|bool
Get all notifications of group
getReviewStatus()  : mixed
getUsers()  : array<string|int, SeedDMS_Core_User>|bool
Get all users which are members of the group
getWorkflowStatus()  : bool|array<string|int, mixed>
Get a list of documents with a workflow
isMember()  : bool
Check if user is member of group
isType()  : mixed
Check if this object is of type 'group'.
remove()  : bool
Delete user group
removeUser()  : bool
Remove users as a member of the group
setComment()  : bool
Set new comment of group
setDMS()  : mixed
setName()  : bool
Set new name of group
toggleManager()  : bool
Toggle manager status of user

Properties

$_comment

The comment of the user group

protected string $_comment

Methods

__construct()

public __construct(mixed $id, mixed $name, mixed $comment) : mixed
Parameters
$id : mixed
$name : mixed
$comment : mixed

__toString()

Cast to string

public __toString() : string
Return values
string

getApprovalStatus()

public getApprovalStatus([mixed $documentID = null ][, mixed $version = null ]) : mixed
Parameters
$documentID : mixed = null
$version : mixed = null

getComment()

Return comment of group

public getComment() : string
Return values
string

getID()

Return internal id of group

public getID() : int
Return values
int

getInstance()

Return an instance of a group object

public static getInstance(string|int $id, SeedDMS_Core_DMS $dms[, string $by = '' ]) : SeedDMS_Core_Group|bool
Parameters
$id : string|int

Id, name of group, depending on the 3rd parameter.

$dms : SeedDMS_Core_DMS

instance of dms

$by : string = ''

search by group name if set to 'name'. Search by Id of group if left empty.

Return values
SeedDMS_Core_Group|bool —

instance of class SeedDMS_Core_Group if group was found, null if group was not found, false in case of error

getName()

Return name of group

public getName() : string
Return values
string

getReviewStatus()

public getReviewStatus([mixed $documentID = null ][, mixed $version = null ]) : mixed
Parameters
$documentID : mixed = null
$version : mixed = null

getWorkflowStatus()

Get a list of documents with a workflow

public getWorkflowStatus([int $documentID = null ][, int $version = null ]) : bool|array<string|int, mixed>
Parameters
$documentID : int = null

optional document id for which to retrieve the reviews

$version : int = null

optional version of the document

Return values
bool|array<string|int, mixed> —

list of all workflows

isMember()

Check if user is member of group

public isMember(SeedDMS_Core_User $user[, bool $asManager = false ]) : bool
Parameters
$user : SeedDMS_Core_User

user to be checked

$asManager : bool = false

also check whether user is manager of group if set to true, otherwise does not care about manager status

Return values
bool —

true if user is member, otherwise false

isType()

Check if this object is of type 'group'.

public isType(string $type) : mixed
Parameters
$type : string

type of object

remove()

Delete user group

public remove(SeedDMS_Core_User $user) : bool

This method deletes the user group and all its references, like access control lists, notifications, etc.

Parameters
$user : SeedDMS_Core_User

the user doing the removal (needed for entry in review log.

Return values
bool —

true on success or false in case of an error

setComment()

Set new comment of group

public setComment( $newComment) : bool
Parameters
$newComment :
Return values
bool —

true on success, otherwise false

setName()

Set new name of group

public setName( $newName) : bool
Parameters
$newName :

new name

Return values
bool —

true on success, otherwise false


        
On this page

Search results