Menu

## SeedDMS_Core_Group
in package

inc.ClassGroup.php : 27

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

inc.ClassGroup.php : 52

The comment of the user group

`protected string $_comment`

#### $_dms

inc.ClassGroup.php : 59

Back reference to DMS this user group belongs to

`protected SeedDMS_Core_DMS $_dms`

#### $_id

inc.ClassGroup.php : 33

The id of the user group

`protected int $_id`

#### $_name

inc.ClassGroup.php : 40

The name of the user group

`protected string $_name`

#### $_users

inc.ClassGroup.php : 45
`protected array<string|int, SeedDMS_Core_User> $_users`

### Methods

#### __construct()

inc.ClassGroup.php : 61
`public __construct(mixed $id, mixed $name, mixed $comment) : mixed`

##### Parameters

$id : mixed
$name : mixed
$comment : mixed

#### __toString()

inc.ClassGroup.php : 140

Cast to string

`public __toString() : string`

##### Return values

string

#### addUser()

inc.ClassGroup.php : 289

Add user as member

`public addUser(SeedDMS_Core_User $user[, bool $asManager = false ]) : bool`

##### Parameters

$user : SeedDMS_Core_User
$asManager : bool = false

  if set, user will be a manager of the group

##### Return values

bool

#### getAllInstances()

inc.ClassGroup.php : 110

Get all groups

`public static getAllInstances( $orderby, SeedDMS_Core_DMS $dms) : array<string|int, SeedDMS_Core_Group>|bool`

##### Parameters

$orderby :

  set to `name` for odering by name

$dms : SeedDMS_Core_DMS

##### Return values

array<string|int, SeedDMS_Core_Group>|bool —

list of groups or false in case of an error

#### getApprovalStatus()

inc.ClassGroup.php : 478
`public getApprovalStatus([mixed $documentID = null ][, mixed $version = null ]) : mixed`

##### Parameters

$documentID : mixed = null
$version : mixed = null

#### getComment()

inc.ClassGroup.php : 207

Return comment of group

`public getComment() : string`

##### Return values

string

#### getDMS()

inc.ClassGroup.php : 163
`public getDMS() : SeedDMS_Core_DMS`

##### Return values

SeedDMS_Core_DMS —

$dms

#### getID()

inc.ClassGroup.php : 172

Return internal id of group

`public getID() : int`

##### Return values

int

#### getInstance()

inc.ClassGroup.php : 79

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

#### getManagers()

inc.ClassGroup.php : 260

Get all users which are managers of the group

`public getManagers() : array<string|int, SeedDMS_Core_User>|bool`

##### Return values

array<string|int, SeedDMS_Core_User>|bool

#### getName()

inc.ClassGroup.php : 179

Return name of group

`public getName() : string`

##### Return values

string

#### getNotifications()

inc.ClassGroup.php : 545

Get all notifications of group

`public getNotifications([int $type = 0 ]) : array<string|int, SeedDMS_Core_Notification>|bool`

##### Parameters

$type : int = 0

  type of item (T_DOCUMENT or T_FOLDER)

##### Return values

array<string|int, SeedDMS_Core_Notification>|bool —

array of notifications

#### getReviewStatus()

inc.ClassGroup.php : 446
`public getReviewStatus([mixed $documentID = null ][, mixed $version = null ]) : mixed`

##### Parameters

$documentID : mixed = null
$version : mixed = null

#### getUsers()

inc.ClassGroup.php : 231

Get all users which are members of the group

`public getUsers() : array<string|int, SeedDMS_Core_User>|bool`

##### Return values

array<string|int, SeedDMS_Core_User>|bool

#### getWorkflowStatus()

inc.ClassGroup.php : 518

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()

inc.ClassGroup.php : 326

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()

inc.ClassGroup.php : 149

Check if this object is of type 'group'.

`public isType(string $type) : mixed`

##### Parameters

$type : string

  type of object

#### remove()

inc.ClassGroup.php : 375

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

#### removeUser()

inc.ClassGroup.php : 307

Remove users as a member of the group

`public removeUser(SeedDMS_Core_User $user) : bool`

##### Parameters

$user : SeedDMS_Core_User

##### Return values

bool

#### setComment()

inc.ClassGroup.php : 215

Set new comment of group

`public setComment( $newComment) : bool`

##### Parameters

$newComment :

##### Return values

bool —

true on success, otherwise false

#### setDMS()

inc.ClassGroup.php : 156
`public setDMS(SeedDMS_Core_DMS $dms) : mixed`

##### Parameters

$dms : SeedDMS_Core_DMS

#### setName()

inc.ClassGroup.php : 187

Set new name of group

`public setName( $newName) : bool`

##### Parameters

$newName :

  new name

##### Return values

bool —

true on success, otherwise false

#### toggleManager()

inc.ClassGroup.php : 353

Toggle manager status of user

`public toggleManager(SeedDMS_Core_User $user) : bool`

##### Parameters

$user : SeedDMS_Core_User

##### Return values

bool —

true if operation was successful, otherwise false

## Search results