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:
- OgMembershipInterface::STATE_ACTIVE
- OgMembershipInterface::STATE_PENDING
- OgMembershipInterface::STATE_BLOCKED.
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\EntityCode
public function setState(string $state) : OgMembershipInterface {
$this
->set('state', $state);
return $this;
}