public function OgMembershipInterface::hasRole in Organic groups 8
Checks if the membership has the role with the given ID.
Parameters
string $role_id: The ID of the role to check.
Return value
bool True if the membership has the role.
1 method overrides OgMembershipInterface::hasRole()
- OgMembership::hasRole in src/
Entity/ OgMembership.php - Checks if the membership has the role with the given ID.
File
- src/
OgMembershipInterface.php, line 248
Class
- OgMembershipInterface
- Provides an interface for OG memberships.
Namespace
Drupal\ogCode
public function hasRole(string $role_id) : bool;