You are here

public function OgMembership::getState in Organic groups 8

Gets the membership state.

Return value

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

Overrides OgMembershipInterface::getState

3 calls to OgMembership::getState()
OgMembership::isActive in src/Entity/OgMembership.php
Returns TRUE if the OG membership is active.
OgMembership::isBlocked in src/Entity/OgMembership.php
Returns TRUE if the OG membership is blocked.
OgMembership::isPending in src/Entity/OgMembership.php
Returns TRUE if the OG membership is pending.

File

src/Entity/OgMembership.php, line 216

Class

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

Namespace

Drupal\og\Entity

Code

public function getState() : string {
  return $this
    ->getFieldValue('state', 'value') ?: '';
}