You are here

public function OgMembershipInterface::isRoleValid in Organic groups 8

Returns whether the given role is valid for this membership.

Parameters

\Drupal\og\OgRoleInterface $role: The role to check.

Return value

bool True if the role is valid, false otherwise.

Throws

\LogicException Thrown when the validity of the role cannot be established, for example because the group hasn't yet been set on the membership.

1 method overrides OgMembershipInterface::isRoleValid()
OgMembership::isRoleValid in src/Entity/OgMembership.php
Returns whether the given role is valid for this membership.

File

src/OgMembershipInterface.php, line 237

Class

OgMembershipInterface
Provides an interface for OG memberships.

Namespace

Drupal\og

Code

public function isRoleValid(OgRoleInterface $role) : bool;