public static function Og::isMemberBlocked in Organic groups 8
Returns whether an entity belongs to a group with a blocked status.
Parameters
\Drupal\Core\Entity\EntityInterface $group: The group entity.
\Drupal\Core\Session\AccountInterface $user: The entity to test the membership for.
Return value
bool True if the membership is blocked.
See also
\Drupal\og\Og::isMember
3 calls to Og::isMemberBlocked()
- GetUserGroupsTest::testIsMemberStates in tests/
src/ Kernel/ Entity/ GetUserGroupsTest.php - Tests member methods for states that other groups users are added to.
- GroupSubscribeFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ GroupSubscribeFormatter.php - Builds a renderable array for a field value.
- SubscriptionController::subscribe in src/
Controller/ SubscriptionController.php - Subscribe a user to group.
File
- src/
Og.php, line 243
Class
- Og
- A static helper class for OG.
Namespace
Drupal\ogCode
public static function isMemberBlocked(EntityInterface $group, AccountInterface $user) {
return static::isMember($group, $user, [
OgMembershipInterface::STATE_BLOCKED,
]);
}