Skip to content

UserGroups ​

Type
Class
Namespace
craft\mcp\capabilities
Inherits
craft\mcp\capabilities\UserGroups
Since
5.12.0

View source

Public Methods ​

MethodDescription
__construct()
create()
delete()
get()
list()
resource()
resourceByIdentifier()
update()

__construct() ​

View source

Arguments ​

  • $userGroups

create() ​

View source

Arguments ​

  • $name
  • $handle
  • $description

Returns ​

array{group: array<string,mixed>}

delete() ​

View source

Arguments ​

  • $id
  • $uid
  • $handle

Returns ​

array{deleted: true}

get() ​

View source

Arguments ​

  • $id
  • $uid
  • $handle

Returns ​

array{group: array<string,mixed>}

list() ​

View source

Returns ​

array{count: int, groups: list<array<string,mixed>>}

resource() ​

View source

Returns ​

array{count: int, groups: list<array<string,mixed>>}

resourceByIdentifier() ​

View source

Arguments ​

  • $group

Returns ​

array{group: array<string,mixed>}

update() ​

View source

Arguments ​

  • $context
  • $id
  • $uid
  • $currentHandle (string, null) – Existing user group handle.
  • $name
  • $handle
  • $description

Returns ​

array{group: array<string,mixed>}