You are here

public function OgMembership::setState in Organic groups 8

Sets the membership state.

Parameters

string $state: The state of the membership. It may be of the following constants:

Return value

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

Overrides OgMembershipInterface::setState

File

src/Entity/OgMembership.php, line 208

Class

OgMembership
The membership entity that connects a group and a user.

Namespace

Drupal\og\Entity

Code

public function setState(string $state) : OgMembershipInterface {
  $this
    ->set('state', $state);
  return $this;
}