You are here

public function OgMembershipInterface::addRole in Organic groups 8

Adds a role to the user membership.

Parameters

\Drupal\og\OgRoleInterface $role: The OG role.

Return value

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

1 method overrides OgMembershipInterface::addRole()
OgMembership::addRole in src/Entity/OgMembership.php
Adds a role to the user membership.

File

src/OgMembershipInterface.php, line 184

Class

OgMembershipInterface
Provides an interface for OG memberships.

Namespace

Drupal\og

Code

public function addRole(OgRoleInterface $role) : OgMembershipInterface;