You are here

public function OgMembershipInterface::setRoles in Organic groups 8

Sets the group's roles for the current user group membership.

Parameters

\Drupal\og\OgRoleInterface[] $roles: The array of OG roles to set.

Return value

\Drupal\og\OgMembershipInterface The updated OG Membership object.

1 method overrides OgMembershipInterface::setRoles()
OgMembership::setRoles in src/Entity/OgMembership.php
Sets the group's roles for the current user group membership.

File

src/OgMembershipInterface.php, line 173

Class

OgMembershipInterface
Provides an interface for OG memberships.

Namespace

Drupal\og

Code

public function setRoles(array $roles = []) : OgMembershipInterface;