public function Workspace::removeMember in Opigno Moxtra 8
Same name and namespace in other branches
- 3.x src/Entity/Workspace.php \Drupal\opigno_moxtra\Entity\Workspace::removeMember()
Removes member from the workspace.
Parameters
int $uid: The user ID.
Return value
$this
Overrides WorkspaceInterface::removeMember
File
- src/
Entity/ Workspace.php, line 153
Class
- Workspace
- Defines the Workspace entity.
Namespace
Drupal\opigno_moxtra\EntityCode
public function removeMember($uid) {
$values = $this
->get('members')
->getValue();
$values = array_filter($values, function ($value) use ($uid) {
return $value['target_id'] != $uid;
});
$this
->set('members', $values);
return $this;
}