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