You are here

public function GroupRole::isMember in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/GroupRole.php \Drupal\group\Entity\GroupRole::isMember()

Returns whether the role is for a member.

Return value

bool Whether the role is for a member.

Overrides GroupRoleInterface::isMember

File

src/Entity/GroupRole.php, line 175

Class

GroupRole
Defines the Group role configuration entity.

Namespace

Drupal\group\Entity

Code

public function isMember() {

  // Instead of checking whether the audience property is set to 'member', we
  // check whether it isn't 'anonymous' or 'outsider'. Any unsupported value
  // will therefore default to 'member'.
  return !$this
    ->isAnonymous() && !$this
    ->isOutsider();
}