You are here

public function Workspace::addMember in Opigno Moxtra 8

Same name and namespace in other branches
  1. 3.x src/Entity/Workspace.php \Drupal\opigno_moxtra\Entity\Workspace::addMember()

Adds member to the workspace.

Parameters

int $uid: The user ID.

Return value

$this

Overrides WorkspaceInterface::addMember

File

src/Entity/Workspace.php, line 145

Class

Workspace
Defines the Workspace entity.

Namespace

Drupal\opigno_moxtra\Entity

Code

public function addMember($uid) {
  $this
    ->get('members')
    ->appendItem([
    'target_id' => $uid,
  ]);
  return $this;
}