public function OgMembership::getGroupBundle in Organic groups 8
Gets the group entity bundle.
Return value
string The bundle.
Overrides OgMembershipInterface::getGroupBundle
1 call to OgMembership::getGroupBundle()
- OgMembership::getRoles in src/
Entity/ OgMembership.php - Gets all the referenced OG roles.
File
- src/
Entity/ OgMembership.php, line 155
Class
- OgMembership
- The membership entity that connects a group and a user.
Namespace
Drupal\og\EntityCode
public function getGroupBundle() : string {
$bundle = $this
->getFieldValue('entity_bundle', 'value') ?: '';
assert(!empty($bundle), new \LogicException(__METHOD__ . '() should only be called on loaded memberships, or on newly created memberships that already have the group bundle set.'));
return $bundle;
}